add a context to Listener.Accept

This commit is contained in:
Marten Seemann
2019-05-28 16:03:38 +02:00
parent 8dbe1684be
commit 12bce1caaa
21 changed files with 74 additions and 40 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"context"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
@@ -35,7 +36,7 @@ func echoServer() error {
if err != nil {
return err
}
sess, err := listener.Accept()
sess, err := listener.Accept(context.Background())
if err != nil {
return err
}