Merge 0.10->trunk
[prosody.git] / plugins / mod_bosh.lua
index 6acdc23cb749345b1d1bb4d558a0ab6dc84b8512..b65e76854b9c355260a4e5cb67f46908a25742b1 100644 (file)
@@ -287,7 +287,7 @@ function stream_callbacks.streamopened(context, attr)
                -- New session
                sid = new_uuid();
                local session = {
-                       type = "c2s_unauthed", conn = {}, sid = sid, rid = rid-1, host = attr.to,
+                       type = "c2s_unauthed", conn = {}, sid = sid, rid = rid, host = attr.to,
                        bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
                        bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY,
                        requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,