# HG changeset patch # User Matthew Wild # Date 1258862317 0 # Node ID 3a5ed91a9f27de0816fbb792f26703c63eaefbda # Parent 93eae69fc121b78621a8b7b2b8d5883146bad221 net.server_event: Use conn property for send/receive instead of caching, fixes trying to use original socket after SSL-wrapping diff -r 93eae69fc121 -r 3a5ed91a9f27 net/server_event.lua --- a/net/server_event.lua Sun Nov 22 03:55:48 2009 +0000 +++ b/net/server_event.lua Sun Nov 22 03:58:37 2009 +0000 @@ -473,7 +473,7 @@ interface.eventwritetimeout = false end end - local succ, err, byte = interface.send( interface.conn, interface.writebuffer, 1, interface.writebufferlen ) + local succ, err, byte = interface.conn:send( interface.writebuffer, 1, interface.writebufferlen ) --vdebug( "write data:", interface.writebuffer, "error:", err, "part:", byte ) if succ then -- writing succesful interface.writebuffer = "" @@ -539,8 +539,8 @@ interface.eventreadtimeout = nil end end - local buffer, err, part = receive( client, pattern ) -- receive buffer with "pattern" --vdebug( "read data:", buffer, "error:", err, "part:", part ) + local buffer, err, part = interface.conn:receive( pattern ) -- receive buffer with "pattern" buffer = buffer or part or "" local len = string_len( buffer ) if len > cfg.MAX_READ_LENGTH then -- check buffer length