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 benchmark
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"io"
@@ -44,7 +45,7 @@ func init() {
)
Expect(err).ToNot(HaveOccurred())
serverAddr <- ln.Addr()
sess, err := ln.Accept()
sess, err := ln.Accept(context.Background())
Expect(err).ToNot(HaveOccurred())
// wait for the client to complete the handshake before sending the data
// this should not be necessary, but due to timing issues on the CIs, this is necessary to avoid sending too many undecryptable packets