mod_bosh: Fix traceback in case session is destroyed during the stream-features event...
authorKim Alvefur <zash@zash.se>
Sun, 2 Jun 2013 17:25:53 +0000 (19:25 +0200)
committerKim Alvefur <zash@zash.se>
Sun, 2 Jun 2013 17:25:53 +0000 (19:25 +0200)
plugins/mod_bosh.lua

index 19f191c8bf6335a924d2de2876885d62453b184e..184da321bfaf9fe9f729ed15963ccdb33fb7872a 100644 (file)
@@ -345,7 +345,7 @@ function stream_callbacks.streamopened(context, attr)
                local features = st.stanza("stream:features");
                hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
                fire_event("stream-features", session, features);
-               table.insert(session.send_buffer, tostring(features));
+               session.send(tostring(features));
                session.notopen = nil;
        end
 end