send a Public Reset when receiving the NSTP tag in the CHLO

We currently don't support the no STOP_WAITING experiment.
This commit is contained in:
Marten Seemann
2017-08-10 09:50:21 +07:00
parent f6e8ce5c67
commit be338c8389
5 changed files with 33 additions and 3 deletions

View File

@@ -804,6 +804,13 @@ var _ = Describe("Session", func() {
Expect(sess.Context().Done()).To(BeClosed())
})
It("sends a Public Reset if the client is initiating the no STOP_WAITING experiment", func() {
sess.Close(handshake.ErrHOLExperiment)
Expect(mconn.written).To(HaveLen(1))
Expect(mconn.written[0][0] & 0x02).ToNot(BeZero()) // Public Reset
Expect(sess.Context().Done()).To(BeClosed())
})
It("cancels the context when the run loop exists", func() {
returned := make(chan struct{})
go func() {