Software /
code /
prosody
Comparison
net/server_select.lua @ 5492:5d0cc5de5c51
net.server_select: Don't call onconnect twice for SSL connections
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 18 Apr 2013 00:41:03 +0100 |
parent | 5491:55faa2fd5549 |
child | 5531:483f795f6f99 |
comparison
equal
deleted
inserted
replaced
5491:55faa2fd5549 | 5492:5d0cc5de5c51 |
---|---|
241 if err then -- error while wrapping ssl socket | 241 if err then -- error while wrapping ssl socket |
242 return false | 242 return false |
243 end | 243 end |
244 connections = connections + 1 | 244 connections = connections + 1 |
245 out_put( "server.lua: accepted new client connection from ", tostring(ip), ":", tostring(clientport), " to ", tostring(serverport)) | 245 out_put( "server.lua: accepted new client connection from ", tostring(ip), ":", tostring(clientport), " to ", tostring(serverport)) |
246 if dispatch then | 246 if dispatch and not sslctx then -- SSL connections will notify onconnect when handshake completes |
247 return dispatch( handler ); | 247 return dispatch( handler ); |
248 end | 248 end |
249 return; | 249 return; |
250 elseif err then -- maybe timeout or something else | 250 elseif err then -- maybe timeout or something else |
251 out_put( "server.lua: error with new client connection: ", tostring(err) ) | 251 out_put( "server.lua: error with new client connection: ", tostring(err) ) |