[#200] Add context to net.Listener
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
ad2c7ca671
commit
c73eed9634
1 changed files with 2 additions and 1 deletions
3
app.go
3
app.go
|
@ -401,8 +401,9 @@ func (a *app) Serve(ctx context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var lnConf net.ListenConfig
|
||||||
var ln net.Listener
|
var ln net.Listener
|
||||||
if ln, err = net.Listen("tcp4", bind); err != nil {
|
if ln, err = lnConf.Listen(ctx, "tcp4", bind); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
lnTLS := tls.NewListener(ln, &tls.Config{
|
lnTLS := tls.NewListener(ln, &tls.Config{
|
||||||
|
|
Loading…
Reference in a new issue