mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
ejabberd_listener: Fix ETS update on port reuse
This commit is contained in:
parent
5e467b96a1
commit
28e28e926a
@ -186,8 +186,8 @@ init_tcp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
|
|||||||
listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
|
listen_tcp(PortIP, Module, SockOpts, Port, IPS) ->
|
||||||
case ets:lookup(listen_sockets, PortIP) of
|
case ets:lookup(listen_sockets, PortIP) of
|
||||||
[{PortIP, ListenSocket}] ->
|
[{PortIP, ListenSocket}] ->
|
||||||
?INFO_MSG("Reusing listening port for ~p", [Port]),
|
?INFO_MSG("Reusing listening port for ~p", [PortIP]),
|
||||||
ets:delete(listen_sockets, Port),
|
ets:delete(listen_sockets, PortIP),
|
||||||
ListenSocket;
|
ListenSocket;
|
||||||
_ ->
|
_ ->
|
||||||
Res = gen_tcp:listen(Port, [binary,
|
Res = gen_tcp:listen(Port, [binary,
|
||||||
|
Loading…
Reference in New Issue
Block a user