From e20bc73324e9e2e4fc5efedfb905bfe4b5c6664a Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Wed, 12 Oct 2011 18:17:12 +0200 Subject: Minor tls_ack simplification We're already monitoring the transport process, no need to do so again. --- lib/diameter/src/base/diameter_peer_fsm.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/diameter') diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl index 282fa2742f..bc7625025a 100644 --- a/lib/diameter/src/base/diameter_peer_fsm.erl +++ b/lib/diameter/src/base/diameter_peer_fsm.erl @@ -685,12 +685,11 @@ open(Pkt, SupportedApps, RCaps, {Type, IS}, #state{parent = Pid, %% and expect a reply when the handshake is complete. tls_ack(true, Type, IS, #state{transport = TPid} = S) -> Ref = make_ref(), - MRef = erlang:monitor(process, TPid), TPid ! {diameter, {tls, Ref, Type, IS == ?TLS}}, receive {diameter, {tls, Ref}} -> - erlang:demonitor(MRef, [flush]); - {'DOWN', MRef, process, _, _} = T -> + ok; + {'DOWN', _, process, TPid, _} = T -> close({tls_ack, T}, S) end; -- cgit v1.2.3