aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_select.lua8
-rw-r--r--plugins/mod_proxy65.lua8
2 files changed, 8 insertions, 8 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
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua
index 2cfbe7b6..5c9ae329 100644
--- a/plugins/mod_proxy65.lua
+++ b/plugins/mod_proxy65.lua
@@ -91,12 +91,12 @@ function connlistener.onincoming(conn, data)
conn:lock_read(true)
else
module:log("warn", "Neither data transfer nor initial connect of a participator of a transfer.")
- conn.close();
+ conn:close();
end
else
if data ~= nil then
module:log("warn", "unknown connection with no authentication data -> closing it");
- conn.close();
+ conn:close();
end
end
end
@@ -107,9 +107,9 @@ function connlistener.ondisconnect(conn, err)
if session.sha and transfers[session.sha] then
local initiator, target = transfers[session.sha].initiator, transfers[session.sha].target;
if initiator == conn and target ~= nil then
- target.close();
+ target:close();
elseif target == conn and initiator ~= nil then
- initiator.close();
+ initiator:close();
end
transfers[session.sha] = nil;
end