drogonframework / drogonframework/drogon
websocket client failed to auto-reconnect when tcp connection got time out
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
I have a long running program that subscribes to a websocket stream and keep receiving messages from the remote server, after running for several days I got these error messages:
```
(IP is omitted)
20230630 06:51:50.743675 UTC 2816896 ERROR [IP-IP] - SO_ERROR = 110 Connection timed out - TcpConnectionImpl.cc:378
20230630 06:51:50.743800 UTC 2816896 ERROR [IP-IP] - SO_ERROR = 110 Connection timed out - TcpConnectionImpl.cc:378
```
and then my program got stuck(no message received anymore), it seems as if the auto-reconnection is not enabled when it got disconnected. How can I detect these errors and try to reconnect to the server and subscribe to the websocket streams again?
Contributor guide
Assessment
This issue has not been assessed yet.