aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-12-15 10:53:10 +0100
committerIngela Anderton Andin <[email protected]>2017-12-15 16:17:38 +0100
commit14c43c187018812d52c4f08bef3f8768d68dc7bc (patch)
tree6e8eae4a1ee0983685ef0598b8c25bdf39ac1c10 /lib/ssl/src
parentbec1c5e3521623a005cdde5e10666e02a3019ec4 (diff)
downloadotp-14c43c187018812d52c4f08bef3f8768d68dc7bc.tar.gz
otp-14c43c187018812d52c4f08bef3f8768d68dc7bc.tar.bz2
otp-14c43c187018812d52c4f08bef3f8768d68dc7bc.zip
dtls: Correct UDP listener cleanup
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/dtls_udp_listener.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_udp_listener.erl b/lib/ssl/src/dtls_udp_listener.erl
index f2166a343e..12e54a0e51 100644
--- a/lib/ssl/src/dtls_udp_listener.erl
+++ b/lib/ssl/src/dtls_udp_listener.erl
@@ -153,15 +153,18 @@ handle_info({udp_error, Socket, Error}, #state{listner = Socket} = State) ->
handle_info({'DOWN', _, process, Pid, _}, #state{clients = Clients,
dtls_processes = Processes0,
+ dtls_msq_queues = MsgQueues0,
close = ListenClosed} = State) ->
Client = kv_get(Pid, Processes0),
Processes = kv_delete(Pid, Processes0),
+ MsgQueues = kv_delete(Client, MsgQueues0),
case ListenClosed andalso kv_empty(Processes) of
true ->
{stop, normal, State};
false ->
{noreply, State#state{clients = set_delete(Client, Clients),
- dtls_processes = Processes}}
+ dtls_processes = Processes,
+ dtls_msq_queues = MsgQueues}}
end.
terminate(_Reason, _State) ->