Mercurial > prosody-hg
comparison plugins/mod_bosh.lua @ 772:cbe49bb8d51d
mod_bosh: Fix for 'invalid key to next' error when using BOSH
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 09 Feb 2009 13:32:46 +0000 |
| parents | ecdf72f9b085 |
| children | c031ead9896d |
comparison
equal
deleted
inserted
replaced
| 771:ecdf72f9b085 | 772:cbe49bb8d51d |
|---|---|
| 241 if session.bosh_max_inactive then | 241 if session.bosh_max_inactive then |
| 242 if now - inactive_since > session.bosh_max_inactive then | 242 if now - inactive_since > session.bosh_max_inactive then |
| 243 (session.log or log)("debug", "BOSH client inactive too long, destroying session at %d", now); | 243 (session.log or log)("debug", "BOSH client inactive too long, destroying session at %d", now); |
| 244 sessions[session.sid] = nil; | 244 sessions[session.sid] = nil; |
| 245 inactive_sessions[session] = nil; | 245 inactive_sessions[session] = nil; |
| 246 session.bosh_max_inactive = nil; -- Stop us marking this session as active during destroy | |
| 246 sm_destroy_session(session, "BOSH client silent for over "..session.bosh_max_inactive.." seconds"); | 247 sm_destroy_session(session, "BOSH client silent for over "..session.bosh_max_inactive.." seconds"); |
| 247 end | 248 end |
| 248 else | 249 else |
| 249 inactive_sessions[session] = nil; | 250 inactive_sessions[session] = nil; |
| 250 end | 251 end |
