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

Replace listener socket.go #37

Open
prawnsalad opened this issue Aug 28, 2017 · 1 comment
Open

Replace listener socket.go #37

prawnsalad opened this issue Aug 28, 2017 · 1 comment

Comments

@prawnsalad
Copy link
Contributor

It's logic is very.. awkward, and the whole finaldata thing to close a socket is very weird to use.

@DanielOaks
Copy link
Member

DanielOaks commented Aug 28, 2017

When we do this, remind me to do a bunch of stress-testing on it (and specifically to keep in mind the memory usage/leaking resulting from sockets not closing correctly). The old socket was much simpler but wrecked us because it'd never completely return and close properly.

The reason why finaldata exists is because when we close because of an error or because the sendq/receiveq is overrun, I want to always make sure the final error/etc is sent indicating that problem. if you just .Send() the error then close the socket, a lot of the time in testing it wouldn't correctly output that before the socket got closed (iirc when the socket was being used in the ircd).

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

No branches or pull requests

2 participants