mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/ejabberd_listener.erl: Check result of controlling_process
SVN Revision: 270
This commit is contained in:
parent
0e2af703bd
commit
db824bfc64
@ -1,5 +1,7 @@
|
||||
2004-09-29 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_listener.erl: Check result of controlling_process
|
||||
|
||||
* src/web/ejabberd_http.erl: Bugfix
|
||||
|
||||
2004-09-27 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
@ -92,7 +92,12 @@ accept(ListenSocket, Module, Opts) ->
|
||||
ok
|
||||
end,
|
||||
{ok, Pid} = Module:start({gen_tcp, Socket}, Opts),
|
||||
gen_tcp:controlling_process(Socket, Pid),
|
||||
case gen_tcp:controlling_process(Socket, Pid) of
|
||||
ok ->
|
||||
ok;
|
||||
{error, _Reason} ->
|
||||
gen_tcp:close(Socket)
|
||||
end,
|
||||
accept(ListenSocket, Module, Opts);
|
||||
{error, Reason} ->
|
||||
?INFO_MSG("(~w) Failed TCP accept: ~w",
|
||||
@ -139,7 +144,7 @@ accept_ssl(ListenSocket, Module, Opts) ->
|
||||
ok
|
||||
end,
|
||||
{ok, Pid} = Module:start({ssl, Socket}, Opts),
|
||||
ssl:controlling_process(Socket, Pid),
|
||||
catch ssl:controlling_process(Socket, Pid),
|
||||
accept_ssl(ListenSocket, Module, Opts);
|
||||
{error, timeout} ->
|
||||
accept_ssl(ListenSocket, Module, Opts);
|
||||
|
Loading…
Reference in New Issue
Block a user