mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 14:47:37 +03:00
net.server_select: Clean up buffer and fire drained callback on successful write before we try and start TLS negotiation (if negotiation fails instantly then we can be left without a handler to use for cleanup) (thanks dersd)
This commit is contained in:
parent
10f55df529
commit
e563e751d0
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue