Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data receiver terminated #43

Closed
wimpie3 opened this issue Feb 18, 2021 · 3 comments
Closed

Data receiver terminated #43

wimpie3 opened this issue Feb 18, 2021 · 3 comments

Comments

@wimpie3
Copy link

wimpie3 commented Feb 18, 2021

I'm using version 2.2.1.1. When I test my code locally on my own pc, I have no issues at all. As soon as I run it on a server on the internet, there seem to be random disconnects and this turns up in the logs:

[SimpleTcp.Server] data receiver terminated for client xxx.xxx.xxx.xxx:yyyyy

(to be clear: this error doesn't appear locally)

Any advice?

@jchristn
Copy link
Owner

Hello, please disable TCP keepalives and let me know if the problem persists.

server.Keepalive.EnableTcpKeepAlives = false;
client.Keepalive.EnableTcpKeepAlives = false;

@wimpie3
Copy link
Author

wimpie3 commented Feb 18, 2021

I had indeed enabled the keep alive. I've removed those lines from the code, everything is running ok now. I suppose this means the default value is "false".

@jchristn
Copy link
Owner

Hi @wimpie3 the unfortunate thing about TCP keepalives is that they are implemented beneath everything I do, and I don't get visibility into how or why they do or don't work. They're really intended to prevent "stuck" network connections due to a cable being unplugged, etc. And generally, they end up causing more problems when actually being used. That's the main reason I disabled them by default. Cheers, Joel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants