Software /
code /
prosody
Comparison
net/server_select.lua @ 6433:b93402cec1c4
net.server_select: When an SSL handshake is connected, if there is pending data to be written to the socket, mark the socket as waiting to send (thanks daurnimator)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 26 Sep 2014 17:16:46 +0100 |
parent | 6382:57d23c26039b |
child | 6442:0f4025abbe8f |
child | 6459:ba421af3dfd3 |
comparison
equal
deleted
inserted
replaced
6427:7653bbd5247e | 6433:b93402cec1c4 |
---|---|
566 handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions | 566 handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions |
567 handler.sendbuffer = _sendbuffer | 567 handler.sendbuffer = _sendbuffer |
568 _ = status and status( handler, "ssl-handshake-complete" ) | 568 _ = status and status( handler, "ssl-handshake-complete" ) |
569 if self.autostart_ssl and listeners.onconnect then | 569 if self.autostart_ssl and listeners.onconnect then |
570 listeners.onconnect(self); | 570 listeners.onconnect(self); |
571 if bufferqueuelen ~= 0 then | |
572 _sendlistlen = addsocket(_sendlist, client, _sendlistlen) | |
573 end | |
571 end | 574 end |
572 _readlistlen = addsocket(_readlist, client, _readlistlen) | 575 _readlistlen = addsocket(_readlist, client, _readlistlen) |
573 return true | 576 return true |
574 else | 577 else |
575 if err == "wantwrite" then | 578 if err == "wantwrite" then |