mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
* src/ejabberd_listener.erl: Define send timeout option to avoid blocking on socket send (EJAB-746).
* src/ejabberd_s2s_out.erl: Likewise. SVN Revision: 1785
This commit is contained in:
parent
2c5b0fb896
commit
efaf182d54
@ -1,3 +1,9 @@
|
|||||||
|
2009-01-08 Mickael Remond <mremond@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd_listener.erl: Define send timeout option to avoid
|
||||||
|
blocking on socket send (EJAB-746).
|
||||||
|
* src/ejabberd_s2s_out.erl: Likewise.
|
||||||
|
|
||||||
2009-01-06 Badlop <badlop@process-one.net>
|
2009-01-06 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
* src/msgs/ru.msg: Fix typo (thanks to Dominges)
|
* src/msgs/ru.msg: Fix typo (thanks to Dominges)
|
||||||
|
@ -38,6 +38,9 @@
|
|||||||
|
|
||||||
-include("ejabberd.hrl").
|
-include("ejabberd.hrl").
|
||||||
|
|
||||||
|
%% We do not block on send anymore.
|
||||||
|
-define(TCP_SEND_TIMEOUT, 15000).
|
||||||
|
|
||||||
start_link() ->
|
start_link() ->
|
||||||
supervisor:start_link({local, ejabberd_listeners}, ?MODULE, []).
|
supervisor:start_link({local, ejabberd_listeners}, ?MODULE, []).
|
||||||
|
|
||||||
@ -93,6 +96,7 @@ init(Port, Module, Opts) ->
|
|||||||
{active, false},
|
{active, false},
|
||||||
{reuseaddr, true},
|
{reuseaddr, true},
|
||||||
{nodelay, true},
|
{nodelay, true},
|
||||||
|
{send_timeout, ?TCP_SEND_TIMEOUT},
|
||||||
{keepalive, true} |
|
{keepalive, true} |
|
||||||
SockOpts]),
|
SockOpts]),
|
||||||
case Res of
|
case Res of
|
||||||
|
@ -95,6 +95,9 @@
|
|||||||
%% -define(FSMLIMITS, [{max_queue, 2000}]).
|
%% -define(FSMLIMITS, [{max_queue, 2000}]).
|
||||||
-define(FSMTIMEOUT, 30000).
|
-define(FSMTIMEOUT, 30000).
|
||||||
|
|
||||||
|
%% We do not block on send anymore.
|
||||||
|
-define(TCP_SEND_TIMEOUT, 15000).
|
||||||
|
|
||||||
%% Maximum delay to wait before retrying to connect after a failed attempt.
|
%% Maximum delay to wait before retrying to connect after a failed attempt.
|
||||||
%% Specified in miliseconds. Default value is 5 minutes.
|
%% Specified in miliseconds. Default value is 5 minutes.
|
||||||
-define(MAX_RETRY_DELAY, 300000).
|
-define(MAX_RETRY_DELAY, 300000).
|
||||||
@ -251,6 +254,7 @@ open_socket1(Addr, Port) ->
|
|||||||
catch ejabberd_socket:connect(
|
catch ejabberd_socket:connect(
|
||||||
Addr, Port,
|
Addr, Port,
|
||||||
[binary, {packet, 0},
|
[binary, {packet, 0},
|
||||||
|
{send_timeout, ?TCP_SEND_TIMEOUT},
|
||||||
{active, false}, inet6]);
|
{active, false}, inet6]);
|
||||||
{'EXIT', Reason1} ->
|
{'EXIT', Reason1} ->
|
||||||
?DEBUG("s2s_out: connect crashed ~p~n", [Reason1]),
|
?DEBUG("s2s_out: connect crashed ~p~n", [Reason1]),
|
||||||
|
Loading…
Reference in New Issue
Block a user