forked from shokai/websocket-client-simple
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
websocket-client-simple/lib/websocket-client-simple/client.rb
Lines 46 to 51 in 17eadab
| while !@closed do | |
| begin | |
| unless recv_data = @socket.getc | |
| sleep 1 | |
| next | |
| end |
When the TCPSocket is closed from the server side, getc always returns nil, so this code is an infinite loop. I am not sure what the intent of this code is, but it is definitely a bug and I am reporting it anyway.
Note that reading one letter at a time by using getc is not a good idea in terms of efficiency.
unasuke and tarui
Metadata
Metadata
Assignees
Labels
No labels