fix compilation errors

This commit is contained in:
Asim Aslam 2019-07-11 10:47:02 +01:00
parent 6581586226
commit 7631463b94

View File

@ -2,6 +2,7 @@
package quic package quic
import ( import (
"context"
"crypto/tls" "crypto/tls"
"encoding/gob" "encoding/gob"
@ -67,12 +68,12 @@ func (q *quicListener) Close() error {
func (q *quicListener) Accept(fn func(transport.Socket)) error { func (q *quicListener) Accept(fn func(transport.Socket)) error {
for { for {
s, err := q.l.Accept() s, err := q.l.Accept(context.TODO())
if err != nil { if err != nil {
return err return err
} }
stream, err := s.AcceptStream() stream, err := s.AcceptStream(context.TODO())
if err != nil { if err != nil {
continue continue
} }
@ -117,7 +118,7 @@ func (q *quicTransport) Dial(addr string, opts ...transport.DialOption) (transpo
return nil, err return nil, err
} }
st, err := s.OpenStreamSync() st, err := s.OpenStreamSync(context.TODO())
if err != nil { if err != nil {
return nil, err return nil, err
} }