Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
nullable #1
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: Websocket: Disconnect not fired
Hello!

When an established websocket connection is forcefully closed the Socket::OnDisconnect event is never fired.
(Test conducted by closing the connection with Sysinternals:TcpView)

It only seem to fire when receiving Close message type.
As a result the application still think the connection is good when it isn't.

I've hooked up both XmppClient.OnClose() and Xmpp.Socket.OnDisconnect() in my efforts.

Any suggestion?

RocknRoll
/B
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
We have made some websocket improvements recently which should fix this.
Can you please try to use the upcoming release 2.1.0.4 from myget feed at:
https://www.myget.org/F/matrix-xmpp/api/v3/index.json
Avatar
nullable #3
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
I upgraded to 2.1.0.4 and Websocket is no longer a Transport option?

  1. _xmppClient = new XmppClient
  2. {
  3.     Transport = Transport.[color=crimson]WebSocket[/color],
  4.     Uri = uri,
  5.     Username = GetUserIdFromJid( user.JidIm ),
  6.     Password = user.JidPassword,
  7.     Resource = Helpers.Resources[XmppResources.DeskWin],
  8.     XmppDomain = uri.Host,
  9.     KeepAliveInterval = -1,
  10.     AutoReplyToPing = true,
  11.     AutoPresence = true,
  12.     AutoRoster = true,
  13. };
This post was edited on 2018-03-16, 15:41 by Alex.
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Looks like something is still wrong with the enw CI/CD processes we created.
When you let me know which version you are using exactly I can attach it here until we have fixed it.
Avatar
nullable #5
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Version is 2.1.0.4
Nuget folder: \<PackageRoot>\MatriX.2.1.0.4\lib\net45\Matrix.dll
Avatar
Alex #6
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
can you try again? the package on myget was replaced
Avatar
nullable #7
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
Much better, thank you!
The OnDisconnect fires properly and I'm able to reconnect the socket, perfect!

/B
Avatar
Alex #8
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It also does not setup keep alives on websockets
great, did you use it from myget?
Avatar
nullable #9
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
I used the zipped one, but I can remove it, restore the nuget feed and retry. Give me a few minutes!
Avatar
nullable #10
Member since Mar 2018 · 8 posts
Group memberships: Members
Show profile · Link to this post
No problem at all with the myget package. Great work!
/B
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS