I assume you are using the browser websocket API (WebSharper.JavaScript.WebSocket) to connect, what about the server side? This sounds more of a server side issue to me. Did you set KeepAlive properly?

By on 12/14/2018 7:46 AM ()

Yes, for the client it is the WebSharper.JavaScript.WebSocket, on the server side I use the basic WebSockets for MVC, in the setup I do this: app.UseWebSockets(WebSocketOptions (KeepAliveInterval = TimeSpan.FromHours 3.)), so in theory here it shouldn't drop the connection before 3 hours. For the Middleware and the Controller I have my own implementation based on this (in F#): https://github.com/radu-matei/websocket-manager

Other than this, everything works as intended.

I was thinking it might be a memory issue where the Controller is dropped if there's no request towards it.

Worst case I just have to implement a ping-pong to the server to ensure the connection stays alive.

By on 12/14/2018 9:38 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper