Closed david415 closed 8 years ago
The golang unix domain socket listener does remove the socket file when it's Close method is called. This is a pretty good blog post and proof of concept code for listen accept loop shutdown in golang:
http://zhen.org/blog/graceful-shutdown-of-go-net-dot-listeners/
please review https://github.com/subgraph/roflcoptor/pull/22/files
our shutdown code path needs to close sockets which if they are unix domain sockets causes their socket file to be removed from the filesystem. We need this behavior so that next time the daemon is stated we can recreate the unix domain socket files with the same specified names without conflict... otherwise the startup will fail if the socket files already exist.