From 4ec5e2345790b9d576e91a97cc867e06c8812164 Mon Sep 17 00:00:00 2001 From: Anton Schirg Date: Sun, 26 Aug 2018 16:45:49 +0200 Subject: [PATCH] set channel buffer to prevent leaking goroutine --- cmd/config_job_source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/config_job_source.go b/cmd/config_job_source.go index 9e2d53c..dba2556 100644 --- a/cmd/config_job_source.go +++ b/cmd/config_job_source.go @@ -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: