aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-17 13:50:33 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-17 13:50:33 +0000
commit8ee0fb71fcba10a54760d4a047a4a91e2ab97ad1 (patch)
tree08ff2f81be281c7d1f399e2e3ff5b74f1671b77b /plugins/mod_bosh.lua
parentc1efda1ffd82e6988ab20b4be5f75ecf31fb551e (diff)
parent07e945631dc2abe7a2afe204919a72d25398c687 (diff)
downloadprosody-8ee0fb71fcba10a54760d4a047a4a91e2ab97ad1.tar.gz
prosody-8ee0fb71fcba10a54760d4a047a4a91e2ab97ad1.zip
Merge Tobias->trunk
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index d346f247..58254169 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -33,7 +33,6 @@ local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1;
local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60;
local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5;
local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2;
-local BOSH_DEFAULT_MAXPAUSE = tonumber(module:get_option("bosh_max_pause")) or 300;
local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure");
@@ -283,9 +282,17 @@ function stream_callbacks.streamopened(request, attr)
fire_event("stream-features", session, features);
--xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'
local response = st.stanza("body", { xmlns = xmlns_bosh,
- inactivity = tostring(BOSH_DEFAULT_INACTIVITY), polling = tostring(BOSH_DEFAULT_POLLING), requests = tostring(BOSH_DEFAULT_REQUESTS), hold = tostring(session.bosh_hold), maxpause = "120",
- sid = sid, authid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0",
- ["xmlns:xmpp"] = "urn:xmpp:xbosh", ["xmlns:stream"] = "http://etherx.jabber.org/streams" }):add_child(features);
+ wait = attr.wait,
+ inactivity = tostring(BOSH_DEFAULT_INACTIVITY),
+ polling = tostring(BOSH_DEFAULT_POLLING),
+ requests = tostring(BOSH_DEFAULT_REQUESTS),
+ hold = tostring(session.bosh_hold),
+ sid = sid, authid = sid,
+ ver = '1.6', from = session.host,
+ secure = 'true', ["xmpp:version"] = "1.0",
+ ["xmlns:xmpp"] = "urn:xmpp:xbosh",
+ ["xmlns:stream"] = "http://etherx.jabber.org/streams"
+ }):add_child(features);
request:send{ headers = default_headers, body = tostring(response) };
request.sid = sid;