You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When native.Connect fails to establish a WebSocket connection with Asterisk it logs the error repeatedly in an infinite loop.
There should be a way for the native.Connect function to return an error immediately upon encountering a WebSocket connection issue
Steps to Reproduce
1- Configure an incorrect WebSocket URL or invalid credentials.
2- Run the code snippet above.
3- Observe that the error details are not logged adequately.
Expected Behavior
run log.Error("Failed to build native ARI client", "error", err) and return false
Actual Behavior
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
...
The text was updated successfully, but these errors were encountered:
When native.Connect fails to establish a WebSocket connection with Asterisk it logs the error repeatedly in an infinite loop.
There should be a way for the native.Connect function to return an error immediately upon encountering a WebSocket connection issue
Steps to Reproduce
1- Configure an incorrect WebSocket URL or invalid credentials.
2- Run the code snippet above.
3- Observe that the error details are not logged adequately.
Expected Behavior
run
log.Error("Failed to build native ARI client", "error", err)
and returnfalse
Actual Behavior
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
level=ERROR msg="failed to connect to Asterisk" app=check-qvs44v5 error="websocket.Dial ws://1.2.3.4:8088/ari/events?app=check-qvs44v5: dial tcp 1.2.3.4:8088: connect: connection timed out"
...
The text was updated successfully, but these errors were encountered: