Merge 0.9->0.10

This commit is contained in:
Kim Alvefur 2017-04-19 20:02:58 +02:00
commit 71582ed712

View file

@ -281,7 +281,7 @@ function stream_callbacks.streamopened(context, attr)
-- New session
sid = new_uuid();
local session = {
type = "c2s_unauthed", conn = {}, sid = sid, rid = rid, host = attr.to,
type = "c2s_unauthed", conn = request.conn, sid = sid, rid = rid, host = attr.to,
bosh_version = attr.ver, bosh_wait = wait, streamid = sid,
bosh_max_inactive = bosh_max_inactivity,
requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
@ -353,6 +353,8 @@ function stream_callbacks.streamopened(context, attr)
return;
end
session.conn = request.conn;
if session.rid then
local rid = tonumber(attr.rid);
local diff = rid - session.rid;