-
Notifications
You must be signed in to change notification settings - Fork 84
What is the recommended way to close/dispose an open channel? #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I looked a bit. It seems that I guess I won't ever recommend using the parameterless overload. The session should be closed properly, with specifying a reason and details if possible. |
Right. Guess I should have tested As for documentation, I was referring to the documentation site. I didn't see an example or mention of closing an opened channel. Should |
Ok I just pushed some implementation of a Elad |
Thanks for the quick response! Unfortunately the close task never seems to complete. After a quick debug it looked like the connection was closing before the client received a i.e. Regardless, would |
This simple example works for me fine, perhaps you can modify it a bit so it breaks? We call Elad |
🤦♂️ turns out I had a dead lock. Fixed that and the close task completes. Doesn't quite fix my issue however since the connection is still open when the close task completes. i.e. this assertion would fail
|
Please try Elad |
That did the trick. Thanks! |
This is now available from NuGet gallery in version v18.9.3. Elad |
Had a quick look through the docs and tests and didn't see any mention of the proper way to close a
IWampChannel
.Reason I ask is that there are two methods
IWampChannel.Close()
andIWampChannel.Close(string, string)
, which are a bit ambiguous without checking the comments and implementation.From what I gather
IWampChannel.Close()
is like aDispose()
call and just closes the underlying connection, effectively having the same effect as negotiating aGOODBYE
with the router.Whereas,
IWampChannel.Close(string, string)
negotiates aGOODBYE
with the router but leaves the underlying connection open?So if the
IWampChannel
isn't going to be re-used isIWampChannel.Close()
the recommended approach?The text was updated successfully, but these errors were encountered: