Skip to content

Commit 9ade24f

Browse files
committed
address strange sock==nil case
1 parent a6dc6cc commit 9ade24f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/websocket/client_ev.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ local ev = function(ws)
144144
local resp = {}
145145
local response = ''
146146
local read_upgrade = function(loop,read_io)
147+
-- this seems to be possible, i don't understand why though :(
148+
if not sock then
149+
read_io:stop(loop)
150+
handshake_io = nil
151+
return
152+
end
147153
repeat
148154
local byte,err,pp = sock:receive(1)
149155
if byte then

0 commit comments

Comments
 (0)