set channel buffer to prevent leaking goroutine

This commit is contained in:
Anton Schirg 2018-08-26 16:45:49 +02:00
parent 13dc63bd23
commit 4ec5e23457

View File

@ -140,7 +140,7 @@ func (j *SourceJob) serve(ctx context.Context) {
conn net.Conn
err error
}
connChan := make(chan connChanMsg)
connChan := make(chan connChanMsg, 1)
// Serve connections until interrupted or error
outer: