diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-10-26 23:35:48 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-10-26 23:35:48 +0000 |
commit | e61fe22f948aba7db734bc849fd2f9247b5ebf5e (patch) | |
tree | 0c099c256327291f60841411ec053ecef7d52b9c /net/server.lua | |
parent | f0b9e5befac2aef2c57d68d1441faed693bacea6 (diff) | |
download | prosody-e61fe22f948aba7db734bc849fd2f9247b5ebf5e.tar.gz prosody-e61fe22f948aba7db734bc849fd2f9247b5ebf5e.zip |
server.lua: Standardise on 'client' variable to refer to the socket, makes the code a bit cleaner
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/server.lua b/net/server.lua index 706f290b..6ab8ce91 100644 --- a/net/server.lua +++ b/net/server.lua @@ -537,8 +537,8 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport handshake = coroutine_wrap( function( client ) -- create handshake coroutine
local err
for i = 1, _maxsslhandshake do
- _sendlistlen = ( wrote and removesocket( _sendlist, socket, _sendlistlen ) ) or _sendlistlen
- _readlistlen = ( read and removesocket( _readlist, socket, _readlistlen ) ) or _readlistlen
+ _sendlistlen = ( wrote and removesocket( _sendlist, client, _sendlistlen ) ) or _sendlistlen
+ _readlistlen = ( read and removesocket( _readlist, client, _readlistlen ) ) or _readlistlen
read, wrote = nil, nil
_, err = client:dohandshake( )
if not err then
@@ -546,7 +546,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions
handler.sendbuffer = _sendbuffer
_ = status and status( handler, "ssl-handshake-complete" )
- _readlistlen = addsocket(_readlist, socket, _readlistlen)
+ _readlistlen = addsocket(_readlist, client, _readlistlen)
return true
else
out_put( "server.lua: error during ssl handshake: ", tostring(err) )
|