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

Poller does not implement Close method #10

Open
wI2L opened this issue Feb 24, 2019 · 1 comment
Open

Poller does not implement Close method #10

wI2L opened this issue Feb 24, 2019 · 1 comment

Comments

@wI2L
Copy link

wI2L commented Feb 24, 2019

The OS independent type Poller does not implement the Close method that can be found in type Epoll and Kqueue (although) it isn't implemented for the last.

I am writing a Websocket tracker using gobwas/ws and this package, and I want to implement a graceful shutdown to my server. As of now, I am calling poller.Stop on all Desc then closing connections, but it represents alot of syscalls, being able to call Close once would be easier and cleaner to stop the background loop.

Also, could you please consider implementing Close for the Kqueue implementation ?

Thanks

@gobwas

@akosyakov
Copy link

Is not it also leaks fd for epoll itself? even if you close all descs fd created by fd, err := unix.EpollCreate1(0) remains?

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