Software /
code /
prosody
Diff
net/server_select.lua @ 2728:3f8d9319d4a3
net.server_select: Fix calling method of some handler.close()s
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 01 Mar 2010 18:06:54 +0000 |
parent | 2598:8a021b304765 |
child | 2732:dabdc56561f9 |
line wrap: on
line diff
--- a/net/server_select.lua Mon Mar 01 16:45:13 2010 +0000 +++ b/net/server_select.lua Mon Mar 01 18:06:54 2010 +0000 @@ -435,7 +435,7 @@ local len = string_len( buffer ) if len > maxreadlen then disconnect( handler, "receive buffer exceeded" ) - handler.close( true ) + handler:close( true ) return false end local count = len * STAT_UNIT @@ -448,7 +448,7 @@ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " read error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) - _ = handler and handler.close( ) + _ = handler and handler:close( ) return false end end @@ -472,7 +472,7 @@ _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) -- delete socket from writelist _ = needtls and handler:starttls(nil, true) _writetimes[ handler ] = nil - _ = toclose and handler.close( ) + _ = toclose and handlerclose( ) return true elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write buffer = string_sub( buffer, byte + 1, bufferlen ) -- new buffer @@ -485,7 +485,7 @@ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " write error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) - _ = handler and handler.close( ) + _ = handler and handler:close( ) return false end end