Skip to content

Commit

Permalink
Remove redundant code path for idle shutdown.
Browse files Browse the repository at this point in the history
Use session:close (bosh_close_stream), so we always shut down in the
same way.
  • Loading branch information
zewt committed May 29, 2011
1 parent 401e675 commit 1ce7086
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/mod_bosh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ function on_timer()
if max_inactive then
if now - inactive_since > max_inactive then
(session.log or log)("debug", "BOSH client inactive too long, destroying session at %d", now);
sessions[session.sid] = nil;
inactive_sessions[session] = nil;
n_dead_sessions = n_dead_sessions + 1;
dead_sessions[n_dead_sessions] = session;
end
Expand All @@ -622,7 +620,7 @@ function on_timer()
for i=1,n_dead_sessions do
local session = dead_sessions[i];
dead_sessions[i] = nil;
sm_destroy_session(session, "BOSH client silent for over "..session.bosh_max_inactive.." seconds");
session:close({condition = "connection-timeout", text = "BOSH client silent for over "..session.bosh_max_inactive.." seconds"});
end
return 1;
end
Expand Down

0 comments on commit 1ce7086

Please sign in to comment.