Software /
code /
prosody
Comparison
net/server_select.lua @ 5482:f2631a14b953
net.server_select: Don't call onconnect twice on SSL connections
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 17 Apr 2013 19:10:04 +0200 |
parent | 5385:d663483036db |
child | 5484:17ce73907c48 |
child | 5490:ab821566ede8 |
comparison
equal
deleted
inserted
replaced
5481:169772e3d4e0 | 5482:f2631a14b953 |
---|---|
549 if not err then | 549 if not err then |
550 out_put( "server.lua: ssl handshake done" ) | 550 out_put( "server.lua: ssl handshake done" ) |
551 handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions | 551 handler.readbuffer = _readbuffer -- when handshake is done, replace the handshake function with regular functions |
552 handler.sendbuffer = _sendbuffer | 552 handler.sendbuffer = _sendbuffer |
553 _ = status and status( handler, "ssl-handshake-complete" ) | 553 _ = status and status( handler, "ssl-handshake-complete" ) |
554 if self.autostart_ssl and listeners.onconnect then | |
555 listeners.onconnect(self); | |
556 end | |
557 _readlistlen = addsocket(_readlist, client, _readlistlen) | 554 _readlistlen = addsocket(_readlist, client, _readlistlen) |
558 return true | 555 return true |
559 else | 556 else |
560 if err == "wantwrite" then | 557 if err == "wantwrite" then |
561 _sendlistlen = addsocket(_sendlist, client, _sendlistlen) | 558 _sendlistlen = addsocket(_sendlist, client, _sendlistlen) |