Software /
code /
prosody
Comparison
plugins/mod_csi_simple.lua @ 9922:06bf5ccd859f
mod_csi_simple: Fix type in function name
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 25 Mar 2019 10:32:39 +0000 |
parent | 9921:ec138e4254ed |
child | 9923:e83dfcdeab59 |
comparison
equal
deleted
inserted
replaced
9921:ec138e4254ed | 9922:06bf5ccd859f |
---|---|
88 else | 88 else |
89 session.log("warn", "Session connection does not support write pausing"); | 89 session.log("warn", "Session connection does not support write pausing"); |
90 end | 90 end |
91 end | 91 end |
92 | 92 |
93 function disble_optimizations(session) | 93 function disable_optimizations(session) |
94 if session.conn and session.conn and session.conn.resume_writes then | 94 if session.conn and session.conn and session.conn.resume_writes then |
95 filters.remove_filter(session, "stanzas/out", manage_buffer); | 95 filters.remove_filter(session, "stanzas/out", manage_buffer); |
96 filters.remove_filter(session, "bytes/in", flush_buffer); | 96 filters.remove_filter(session, "bytes/in", flush_buffer); |
97 session.conn:resume_writes(); | 97 session.conn:resume_writes(); |
98 end | 98 end |
103 enable_optimizations(session); | 103 enable_optimizations(session); |
104 end); | 104 end); |
105 | 105 |
106 module:hook("csi-client-active", function (event) | 106 module:hook("csi-client-active", function (event) |
107 local session = event.origin; | 107 local session = event.origin; |
108 disble_optimizations(session); | 108 disable_optimizations(session); |
109 end); | 109 end); |
110 | 110 |
111 | 111 |
112 module:hook("c2s-ondrain", function (event) | 112 module:hook("c2s-ondrain", function (event) |
113 local session = event.session; | 113 local session = event.session; |
130 | 130 |
131 function module.unload() | 131 function module.unload() |
132 for _, user_session in pairs(prosody.hosts[module.host].sessions) do | 132 for _, user_session in pairs(prosody.hosts[module.host].sessions) do |
133 for _, session in pairs(user_session.sessions) do | 133 for _, session in pairs(user_session.sessions) do |
134 if session.state == "inactive" then | 134 if session.state == "inactive" then |
135 disble_optimizations(session); | 135 disable_optimizations(session); |
136 end | 136 end |
137 end | 137 end |
138 end | 138 end |
139 end | 139 end |
140 |