-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Labels
Description
Hi again,
I had a strange problem on some machine. I have a local connection WampSharp on my PC between two software (I will call it A and B). The software "A" is a router who create the DefaultWampHost and register himself as a callee :
if (Host != null)
Host.Dispose();
// Creation of the WampHost with authentication
Host = new DefaultWampHost(ServerAddress);
Host.Open();
Logger.Trace("Connection wamp host ---> {0}", ServerAddress);
Realm = Host.RealmContainer.GetRealmByName(REALM_NAME);
RegisterCallee = Realm.Services.RegisterCallee(this).Result;
Realm.SessionCreated += Realm_SessionCreated;
Realm.SessionClosed += Realm_SessionClosed;
this is the code when it's close :
RegisterCallee.DisposeAsync();
if (Realm != null)
{
Realm.SessionCreated -= Realm_SessionCreated;
Realm.SessionClosed -= Realm_SessionClosed;
}
Host?.Dispose();
Host = null;
Realm = null;
Now the "B" application connect to this WampHost and subscribe to different topic. The problem is when I close the WampHost the software "B" must be exit too. Then, I got an error before the closing of the software "B" :
<InnerException>
<ExceptionType>System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Unknown subscription: 950784773309608</Message>
<StackTrace> at System.Threading.Tasks.TaskExceptionHolder.Finalize()
00000123 0.41678721 [2580]
</StackTrace>
<ExceptionString>System.Exception: Unknown subscription: 950784773309608</ExceptionString></InnerException>
When i got the connection broken I make different actions in this order :
- I Dispose all the subscription
- I unsubscribe to the events ConnectionError, ConnectionBroken and ConnectionEstablished
- I close the Channel and set it to null
- I set my Service and my WampRealmProxy to null
Do you have some idea what could it be ?
Thank you
Leo