diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-03-01 18:06:54 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-03-01 18:06:54 +0000 |
commit | 9d6219b596ccf58fc409a7a84b6063b1c2955222 (patch) | |
tree | a2f13dfb7ee61d2b513e097ece9738d8f4e1d980 | |
parent | f1871510b798f5dbe8fa6263fe2e9478c1cdac6d (diff) | |
download | prosody-9d6219b596ccf58fc409a7a84b6063b1c2955222.tar.gz prosody-9d6219b596ccf58fc409a7a84b6063b1c2955222.zip |
net.server_select: Fix calling method of some handler.close()s
-rw-r--r-- | net/server_select.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/server_select.lua b/net/server_select.lua index 685cd13e..ca8b1113 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -435,7 +435,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport 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 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport 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 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport _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 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport 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 |