mod_adhoc: Use mod_disco for disco handling
[prosody.git] / plugins / mod_c2s.lua
index 91bde5742f844f6019797129f7e15a64412da32c..3eb9e975df3535e850e9c27c2cc5ff165960cc90 100644 (file)
@@ -25,7 +25,7 @@ local log = module._log;
 
 local c2s_timeout = module:get_option_number("c2s_timeout");
 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5);
-local opt_keepalives = module:get_option_boolean("tcp_keepalives", false);
+local opt_keepalives = module:get_option_boolean("c2s_tcp_keepalives", module:get_option_boolean("tcp_keepalives", true));
 
 local sessions = module:shared("sessions");
 local core_process_stanza = prosody.core_process_stanza;
@@ -79,8 +79,6 @@ function stream_callbacks.streamopened(session, attr)
 
        local features = st.stanza("stream:features");
        hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
-       module:fire_event("stream-features", session, features);
-
        send(features);
 end