Skip to content

Commit 775b027

Browse files
committed
Fix wss timeout handling
1 parent d92db38 commit 775b027

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/websocket/sync.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ local connect = function(self,ws_url,ws_protocol,ssl_params)
128128
return nil,err,nil
129129
end
130130
if protocol == 'wss' then
131+
local timeout = self.sock:gettimeout()
131132
self.sock = ssl.wrap(self.sock, ssl_params)
133+
self.sock:settimeout(timeout)
132134
self.sock:sni(host)
133135
self.sock:dohandshake()
134136
elseif protocol ~= "ws" then

0 commit comments

Comments
 (0)