25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

ejabberd_listener: Fix ETS update on port reuse

This commit is contained in:
Holger Weiss 2015-10-18 01:14:48 +02:00
parent 5e467b96a1
commit 28e28e926a

View File

@ -186,8 +186,8 @@ init_tcp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
case ets:lookup(listen_sockets, PortIP) of
[{PortIP, ListenSocket}] ->
?INFO_MSG("Reusing listening port for ~p", [Port]),
ets:delete(listen_sockets, Port),
?INFO_MSG("Reusing listening port for ~p", [PortIP]),
ets:delete(listen_sockets, PortIP),
ListenSocket;
_ ->
Res = gen_tcp:listen(Port, [binary,