aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_select.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_select.lua')
-rw-r--r--net/server_select.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/server_select.lua b/net/server_select.lua
index 96c73fde..bb3b12c9 100644
--- a/net/server_select.lua
+++ b/net/server_select.lua
@@ -512,8 +512,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
local handshake;
function handler.set_sslctx(self, new_sslctx)
sslctx = new_sslctx;
- local wrote
- local read
+ local read, wrote
handshake = coroutine_wrap( function( client ) -- create handshake coroutine
local err
for i = 1, _maxsslhandshake do
@@ -529,10 +528,10 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
_readlistlen = addsocket(_readlist, client, _readlistlen)
return true
else
- if err == "wantwrite" and not wrote then
+ if err == "wantwrite" then
_sendlistlen = addsocket(_sendlist, client, _sendlistlen)
wrote = true
- elseif err == "wantread" and not read then
+ elseif err == "wantread" then
_readlistlen = addsocket(_readlist, client, _readlistlen)
read = true
else