This repository was archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
Reconnect fails #17
Copy link
Copy link
Open
Description
Hi All,
I'm trying SocketIOSharp on mini project I'm working on, and I'm having one issue. Every time I restart the server, I'm getting an error.
Node.JS server below.
const express = require('express');
const app = express();
const http = require('http').Server(app);
const io = require('socket.io')(http);
const port = process.env.PORT || 80;
io.on('connection', (socket) => {
console.log(socket);
});
http.listen(port, () => {
console.log('listening on port:' + port);
});
Error
24/12/2021 18:28:19|Fatal|<>c__DisplayClass52_0.<ReadBytesAsync>b__0|System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at WebSocketSharp.Ext.<>c__DisplayClass52_0.<ReadBytesAsync>b__0(IAsyncResult ar) in D:\repositories\uhm0311\websocket-sharp\websocket-sharp\Ext.cs:line 674 :
EngineIOSharp.Client.Transport.EngineIOPolling : EngineIOSharp.Common.EngineIOException: Error ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at EngineIOSharp.Client.Transport.EngineIOPolling.Request(EngineIOHttpMethod Method, Object EncodedPacket, Action`1 ErrorCallback) in D:\repositories\uhm0311\EngineIOSharp\EngineIOSharp\Client\Transport\EngineIOPolling.cs:line 156
--- End of inner exception stack trace ---
Any ideas why this happening? Reconnect default settings seem fine, so I'm a bit confused. I searched online but I didn't find anything similar.
Many thanks,
Nick
NicoAiko
Metadata
Metadata
Assignees
Labels
No labels