Mercurial > prosody-hg
comparison core/presencemanager.lua @ 563:099d8a102deb
Add TLS socket to readlist before handshake starts, fixes major slow-down on TLS connections
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2008 19:24:01 +0000 |
| parents | cccd610a0ef9 |
| children | 3a49d85cafbc |
comparison
equal
deleted
inserted
replaced
| 562:04ee161d936b | 563:099d8a102deb |
|---|---|
| 19 | 19 |
| 20 | 20 |
| 21 | 21 |
| 22 local log = require "util.logger".init("presencemanager") | 22 local log = require "util.logger".init("presencemanager") |
| 23 | 23 |
| 24 local tostring = tostring; | |
| 24 local require = require; | 25 local require = require; |
| 25 local pairs, ipairs = pairs, ipairs; | 26 local pairs, ipairs = pairs, ipairs; |
| 26 local t_concat = table.concat; | 27 local t_concat = table.concat; |
| 27 local s_find = string.find; | 28 local s_find = string.find; |
| 28 local tonumber = tonumber; | 29 local tonumber = tonumber; |
| 119 end | 120 end |
| 120 stanza.attr.to = nil; -- reset it | 121 stanza.attr.to = nil; -- reset it |
| 121 else | 122 else |
| 122 log("error", "presence recieved from client with no roster"); | 123 log("error", "presence recieved from client with no roster"); |
| 123 end | 124 end |
| 125 | |
| 126 if origin.conntimetotal then | |
| 127 local session = origin; | |
| 128 origin.log("BLAH", "***********\n\n\n\n\n\n****************"); | |
| 129 origin.send(st.stanza("message", { from = session.host, to=session.full_jid, type = "normal" }):body("Your login took "..tostring(session.conntimetotal).." seconds")); | |
| 130 origin.conntimetotal = nil; | |
| 131 end | |
| 132 | |
| 124 end | 133 end |
| 125 | 134 |
| 126 function send_presence_of_available_resources(user, host, jid, recipient_session, core_route_stanza) | 135 function send_presence_of_available_resources(user, host, jid, recipient_session, core_route_stanza) |
| 127 local h = hosts[host]; | 136 local h = hosts[host]; |
| 128 local count = 0; | 137 local count = 0; |
