Use numReaders as a proxy for SSF listener using SO_REUSEPORT
This should allow veneur to restart under einhorn if it's running
there, and is a fairly reasonable proxy (though ultimately we should
probably have a separate check for it) (:
@@ -107,8 +107,9 @@ func StartSSF(s *Server, a net.Addr, tracePool *sync.Pool) {
}
func startSSFUDP(s *Server, addr *net.UDPAddr, tracePool *sync.Pool) {
- // if we want to use multiple readers, make reuseport a parameter, like ReadMetricSocket.
- listener, err := NewSocket(addr, s.RcvbufBytes, false)
+ // TODO: Make this actually use readers / add a predicate
+ // function for testing if we should SO_REUSEPORT.
+ listener, err := NewSocket(addr, s.RcvbufBytes, s.numReaders > 1)
if err != nil {
// if any goroutine fails to create the socket, we can't really
// recover, so we just blow up
