Comparison

plugins/mod_bosh.lua @ 5639:7a0e19e649b7

mod_bosh: Fix traceback in case session is destroyed during the stream-features event (thanks Biszkopcik)
author Kim Alvefur <zash@zash.se>
date Sun, 02 Jun 2013 19:25:53 +0200
parent 5188:6689605f8591
child 5640:4f1889672063
child 5644:f9cfe6f5d60f
comparison
equal deleted inserted replaced
5630:5f3c0b11aa88 5639:7a0e19e649b7
343 343
344 if session.notopen then 344 if session.notopen then
345 local features = st.stanza("stream:features"); 345 local features = st.stanza("stream:features");
346 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); 346 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
347 fire_event("stream-features", session, features); 347 fire_event("stream-features", session, features);
348 table.insert(session.send_buffer, tostring(features)); 348 session.send(tostring(features));
349 session.notopen = nil; 349 session.notopen = nil;
350 end 350 end
351 end 351 end
352 352
353 function stream_callbacks.handlestanza(context, stanza) 353 function stream_callbacks.handlestanza(context, stanza)