jchristn/WatsonWebsocket

服务开启后,运行一段时间后,无法连接到websocket

Closed this issue · 4 comments

服务开启后,运行一段时间后,无法连接到websocket

Hi, Google translates this to "After the service is turned on, it cannot be connected after running for a while."
I assume that after you've had the service running for some time, it stops accepting new connections? Could you enable debugging on the server and send me any output you see? Or provide some detail on how to reproduce? Thanks!

谢谢您的回复,
在.net core下 使用 HostBuilder 启动服务, ConfigureServices中添加
services.AddHostedService();来注册websocket

WebSocketHostedServer 继承 BackgroundService,
ExecuteAsync方法
server = new WsServer("*", 9090, false, true, null, ClientConnected, ClientDisconnected, MessageReceived, true);
启动websocket

Centos7+.net core 2.2 下部署
9090端口使用Telnet可以连上,但websocket客户端(html5)连不上
使用场景:
Redis订阅消息=>WebSocket 服务 推送 到 Web

Hi @chaojicpu I am so sorry I am just now responding to this. Completely my fault for not keeping this prioritized and allowing it to fall through the cracks. Could you try with the latest NuGet version to see if the issue persists? I completely understand if you've moved on to another solution.