send a NEW_TOKEN from after completing the handshake (as a server)

This commit is contained in:
Marten Seemann 2019-06-01 17:12:54 +08:00
parent 7c7bcede6c
commit 34543848f0
9 changed files with 97 additions and 29 deletions

View file

@ -196,7 +196,12 @@ var _ = Describe("Handshake tests", func() {
}
BeforeEach(func() {
serverConfig.AcceptToken = func(net.Addr, *quic.Token) bool { return true }
serverConfig.AcceptToken = func(addr net.Addr, token *quic.Token) bool {
if token != nil {
Expect(token.IsRetryToken).To(BeFalse())
}
return true
}
var err error
// start the server, but don't call Accept
server, err = quic.ListenAddr("localhost:0", testdata.GetTLSConfig(), serverConfig)