rstudio/websocket

Error getting remote endpoint: asio.system:9 (Bad file descriptor)

sourav-majumdar-math opened this issue · 1 comments

I get this error on two Ubuntu 20.04 machines on running ws <- WebSocket$new("ws://echo.websocket.org/").

The full error is given below,

[2021-10-05 15:43:21] [info] Error getting remote endpoint: asio.system:9 (Bad file descriptor)
[2021-10-05 15:43:21] [info] asio async_shutdown error: asio.system:9 (Bad file descriptor)
[2021-10-05 15:43:21] [error] handle_connect error: Timer Expired

I have been getting this error a lot too. My websocket will connect for a few seconds with readyState() == 1 and then these errors will pop up. It would be nice of there was some documentation which suggested what the best way to handle these kinds of apparently common websocket errors from R. One particular frustration is that you cannot just reconnect.

Warning message:
In news_stream$connect() :
  Ignoring extraneous connect() call (did you mean to have autoConnect=FALSE in the constructor?)