# HG changeset patch # User Matthew Wild # Date 1313866996 14400 # Node ID 4b5290dd4e5841313917c3b77b1a2ecc86554792 # Parent 28b9384c14fde532eac0e3ff0278140501621c4c net.server_select: Small fix to SSL handshake logic, read/wrote were being checked despite it not being possible for them to be other than nil diff -r 28b9384c14fd -r 4b5290dd4e58 net/server_select.lua --- a/net/server_select.lua Sat Aug 20 14:59:31 2011 -0400 +++ b/net/server_select.lua Sat Aug 20 15:03:16 2011 -0400 @@ -512,8 +512,7 @@ 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 @@ _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