Software /
code /
prosody
Changeset
2059:d4fb80b60c65
server.lua: Standardise on 'client' variable to refer to the socket, makes the code a bit cleaner
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 26 Oct 2009 23:35:48 +0000 |
parents | 2058:77244fd4ca99 |
children | 2060:b23295b5428a |
files | net/server.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server.lua Mon Oct 26 23:30:15 2009 +0000 +++ b/net/server.lua Mon Oct 26 23:35:48 2009 +0000 @@ -537,8 +537,8 @@ 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 @@ 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) )