Ensure socket is closed on return of accept loop

This commit is contained in:
Michael Crosby 2014-12-12 23:09:22 -08:00
parent ba1dd64475
commit 4219146406

View File

@ -223,6 +223,7 @@ func (s *Server) Start(laddr string) error {
logger.Infof("Listening on %s", laddr)
go func() {
defer socket.Close()
for {
conn, err := socket.Accept()