From a53261a784d5670a6e0d4c65987f8c7363e6f9cd Mon Sep 17 00:00:00 2001 From: Elad Zelingher Date: Thu, 29 Dec 2016 19:55:55 +0200 Subject: [PATCH] Trying to fix #60 --- .../WAMP2/V2/Client/Session/WampSessionClient.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net45/WampSharp/WAMP2/V2/Client/Session/WampSessionClient.cs b/src/net45/WampSharp/WAMP2/V2/Client/Session/WampSessionClient.cs index 18f57b576..cebb9e607 100644 --- a/src/net45/WampSharp/WAMP2/V2/Client/Session/WampSessionClient.cs +++ b/src/net45/WampSharp/WAMP2/V2/Client/Session/WampSessionClient.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using WampSharp.Core.Listener; @@ -125,6 +124,10 @@ private void RaiseConnectionBroken(SessionCloseType sessionCloseType, GoodbyeAbo Interlocked.CompareExchange(ref mIsConnected, 0, 1); + mOpenTask = new TaskCompletionSource(); + + mConnectionBrokenRaised = false; + OnConnectionBroken(closeEventArgs); } @@ -192,9 +195,6 @@ public void OnConnectionClosed() null, null); } - - mConnectionBrokenRaised = false; - mOpenTask = new TaskCompletionSource(); } public void OnConnectionError(Exception exception)