From c73eed9634e303be7008d0630e527e7166f4f077 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Mon, 12 Sep 2022 16:50:18 +0300 Subject: [PATCH] [#200] Add context to net.Listener Signed-off-by: Denis Kirillov --- app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 9b34267..7cc84cc 100644 --- a/app.go +++ b/app.go @@ -401,8 +401,9 @@ func (a *app) Serve(ctx context.Context) { return } + var lnConf net.ListenConfig var ln net.Listener - if ln, err = net.Listen("tcp4", bind); err != nil { + if ln, err = lnConf.Listen(ctx, "tcp4", bind); err != nil { return } lnTLS := tls.NewListener(ln, &tls.Config{