Diff

plugins/mod_s2s/s2sout.lib.lua @ 7561:ab8324d3b899

mod_s2s: Set read mode for s2sout sockets to the same as s2sins
author Kim Alvefur <zash@zash.se>
date Fri, 12 Aug 2016 01:38:40 +0200
parent 7098:5286e79c6829
child 7685:8e43a05e2374
line wrap: on
line diff
--- a/plugins/mod_s2s/s2sout.lib.lua	Wed Aug 10 13:56:27 2016 +0200
+++ b/plugins/mod_s2s/s2sout.lib.lua	Fri Aug 12 01:38:40 2016 +0200
@@ -22,6 +22,8 @@
 
 local s2s_destroy_session = require "core.s2smanager".destroy_session;
 
+local default_mode = module:get_option("network_default_read_size", 4096);
+
 local log = module._log;
 
 local sources = {};
@@ -282,7 +284,7 @@
 		return false, err;
 	end
 
-	conn = wrapclient(conn, connect_host.addr, connect_port, s2s_listener, "*a");
+	conn = wrapclient(conn, connect_host.addr, connect_port, s2s_listener, default_mode);
 	host_session.conn = conn;
 
 	-- Register this outgoing connection so that xmppserver_listener knows about it