When the EventSocket connects to FreeSWITCH and no auth command is sent afterwards, FreeSWITCH sends a disconnect notice after about 25 seconds:
[2021-11-05T17:12:58Z ERROR free_socks::event_socket] Reader loop crashed: Socket receiver closed by peer.
[2021-11-05T17:12:58Z DEBUG free_socks::event_socket] Ending reader loop
[2021-11-05T17:12:58Z TRACE free_socks::event_socket] Received: Message { headers: [("Content-Type", "text/disconnect-notice"), ("Content-Length", "67")], content: Some(Content { ty: "text/disconnect-notice", data: "Disconnected, goodbye.\nSee you at
ClueCon! http://www.cluecon.com/\n" }) }
[2021-11-05T17:12:58Z DEBUG free_socks::event_socket] Received disconnect notice: Disconnected, goodbye.
See you at ClueCon! http://www.cluecon.com/
The problem is that there is currently no way to detect this until another command is sent.
Ideas:
- Add a
is_connected() function.
- Provide a future or a one time channel that gets signaled as soon a disconnect happens.
When the
EventSocketconnects to FreeSWITCH and noauthcommand is sent afterwards, FreeSWITCH sends a disconnect notice after about 25 seconds:The problem is that there is currently no way to detect this until another command is sent.
Ideas:
is_connected()function.