Comparison

net/server_select.lua @ 4111:4716c7645ad2

net.server_select, net.server_event: Silence 'error during ssl handshake' for wantread and wantwrite
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Jan 2011 05:04:08 +0000
parent 3894:22368fbb71dd
child 4145:e992650185c8
comparison
equal deleted inserted replaced
4109:d26db1f936f8 4111:4716c7645ad2
528 handler.sendbuffer = _sendbuffer 528 handler.sendbuffer = _sendbuffer
529 _ = status and status( handler, "ssl-handshake-complete" ) 529 _ = status and status( handler, "ssl-handshake-complete" )
530 _readlistlen = addsocket(_readlist, client, _readlistlen) 530 _readlistlen = addsocket(_readlist, client, _readlistlen)
531 return true 531 return true
532 else 532 else
533 out_put( "server.lua: error during ssl handshake: ", tostring(err) )
534 if err == "wantwrite" and not wrote then 533 if err == "wantwrite" and not wrote then
535 _sendlistlen = addsocket(_sendlist, client, _sendlistlen) 534 _sendlistlen = addsocket(_sendlist, client, _sendlistlen)
536 wrote = true 535 wrote = true
537 elseif err == "wantread" and not read then 536 elseif err == "wantread" and not read then
538 _readlistlen = addsocket(_readlist, client, _readlistlen) 537 _readlistlen = addsocket(_readlist, client, _readlistlen)
539 read = true 538 read = true
540 else 539 else
540 out_put( "server.lua: ssl handshake error: ", tostring(err) )
541 break; 541 break;
542 end 542 end
543 --coroutine_yield( handler, nil, err ) -- handshake not finished 543 --coroutine_yield( handler, nil, err ) -- handshake not finished
544 coroutine_yield( ) 544 coroutine_yield( )
545 end 545 end