remove Session.Close()

Session.Close() sends a transport-level error code. Applications should
not be able to call this function, but use CloseWithError() instead.
This commit is contained in:
Marten Seemann 2020-01-22 20:53:01 +07:00
parent a5120204cc
commit a93e544c94
29 changed files with 101 additions and 123 deletions

View file

@ -100,7 +100,7 @@ var _ = Describe("Drop Tests", func() {
time.Sleep(messageInterval)
}
<-done
Expect(sess.Close()).To(Succeed())
Expect(sess.CloseWithError(0, "")).To(Succeed())
}()
sess, err := quic.DialAddr(
@ -109,7 +109,7 @@ var _ = Describe("Drop Tests", func() {
&quic.Config{Versions: []protocol.VersionNumber{version}},
)
Expect(err).ToNot(HaveOccurred())
defer sess.Close()
defer sess.CloseWithError(0, "")
str, err := sess.AcceptStream(context.Background())
Expect(err).ToNot(HaveOccurred())
for i := uint8(1); i <= numMessages; i++ {