mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
Merge 0.12->trunk
This commit is contained in:
commit
8c6116120b
1 changed files with 8 additions and 0 deletions
|
@ -166,6 +166,10 @@ function enable_optimizations(session)
|
|||
session.conn:pause_writes();
|
||||
session.csi_measure_buffer_hold = measure_buffer_hold();
|
||||
session.csi_counter = 0;
|
||||
if session.csi_resume then
|
||||
timer.stop(session.csi_resume);
|
||||
session.csi_resume = nil;
|
||||
end
|
||||
filters.add_filter(session, "stanzas/out", manage_buffer);
|
||||
filters.add_filter(session, "bytes/in", flush_buffer);
|
||||
else
|
||||
|
@ -177,6 +181,10 @@ function disable_optimizations(session)
|
|||
filters.remove_filter(session, "stanzas/out", manage_buffer);
|
||||
filters.remove_filter(session, "bytes/in", flush_buffer);
|
||||
session.csi_counter = nil;
|
||||
if session.csi_resume then
|
||||
timer.stop(session.csi_resume);
|
||||
session.csi_resume = nil;
|
||||
end
|
||||
if session.csi_measure_buffer_hold then
|
||||
session.csi_measure_buffer_hold();
|
||||
session.csi_measure_buffer_hold = nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue