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

@@ -2,6 +2,7 @@ package http3
import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
@@ -114,7 +115,7 @@ func (s *Server) serveImpl(tlsConfig *tls.Config, conn net.PacketConn) error {
s.listenerMutex.Unlock()
for {
sess, err := ln.Accept()
sess, err := ln.Accept(context.Background())
if err != nil {
return err
}