aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_select.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 4eb82b97..298e560a 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -479,11 +479,11 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
bufferqueuelen = 0
bufferlen = 0
_sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) -- delete socket from writelist
- _ = needtls and handler:starttls(nil, true)
_writetimes[ handler ] = nil
if drain then
drain(handler)
end
+ _ = needtls and handler:starttls(nil, true)
_ = toclose and handler:close( )
return true
elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write