aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-22 03:58:37 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-22 03:58:37 +0000
commit4d67d89061c92629e6e942ab2851482cc077ad7d (patch)
tree4628050afc9635d30ed63cfd679be426debf0b04 /net
parente2d6a0c9c733449be39f5d728b4122eed428d766 (diff)
downloadprosody-4d67d89061c92629e6e942ab2851482cc077ad7d.tar.gz
prosody-4d67d89061c92629e6e942ab2851482cc077ad7d.zip
net.server_event: Use conn property for send/receive instead of caching, fixes trying to use original socket after SSL-wrapping
Diffstat (limited to 'net')
-rw-r--r--net/server_event.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index 50538e05..75c146eb 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -473,7 +473,7 @@ do
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 @@ do
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