chronoxor / NetCoreServer

Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
https://chronoxor.github.io/NetCoreServer
MIT License
2.63k stars 550 forks source link

OnDisconneting after send data #268

Open carolfelix opened 1 year ago

carolfelix commented 1 year ago

When I receive the request, I process and return, but when sending data to the client, OnDisconnecting is called and resets the connection, I don't know why this happens, because in my code I don't call it. The message size is small. This behavior only occurs on some clients. Can someone help me?

alandemaria commented 11 months ago

Are you using TcpServer? If there is an error when sending, the library will disconnect: https://github.com/chronoxor/NetCoreServer/blob/eef988d7a0ba767b06cc3277fc858850cd3149c4/source/NetCoreServer/TcpSession.cs#L280