“websocket was interrupted while page is loading” on Firefox for Socket.io

前端 未结 6 1847
不知归路
不知归路 2020-12-07 13:19
Error: The connection to  was interrupted while the page was loading.
Source File: localhost/socket.io/node_modules/socket.io-client/dist/socket.io.         


        
6条回答
  •  没有蜡笔的小新
    2020-12-07 13:56

    I've had this problem with our custom Undertow-based webserver for years -- my problem was that my server was not responding to the socket close message.

    Based on a comment by Jan Wielemaker I checked my socket close handler code for AbstractReceiveListener.onFullCloseMessage and realized I had not called the super method. After adding super.close() the socket closes cleanly on the client and no error is emitted.

提交回复
热议问题