Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Access to internal listener variable #10

Open
bendikro opened this issue Jan 5, 2018 · 2 comments
Open

Access to internal listener variable #10

bendikro opened this issue Jan 5, 2018 · 2 comments

Comments

@bendikro
Copy link

bendikro commented Jan 5, 2018

When passing a listening address with port 0, a suiting port number is chosen. However, finding out which port was chosen requires access to the listener variable of type net.Listener (?). Private variables makes this to difficult to solve without hacking the library directly.

@daaku
Copy link
Contributor

daaku commented Jan 5, 2018

At this point I'd suggest not adding new features here and instead using the standard library support for graceful shutdown that was added in Go 1.8:

https://golang.org/pkg/net/http/#Server.Shutdown

@bendikro
Copy link
Author

I'm not quite sure I understand how that will help figuring out which port is listened on?

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

No branches or pull requests

2 participants