[#200] Add context to net.Listener

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-09-12 16:50:18 +03:00 committed by Kirillov Denis
parent ad2c7ca671
commit c73eed9634

3
app.go
View file

@ -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{