We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91eba53 commit 9de4e88Copy full SHA for 9de4e88
quic/safe_stream.go
@@ -41,3 +41,14 @@ func (s *SafeStreamCloser) Close() error {
41
s.stream.CancelRead(0)
42
return s.stream.Close()
43
}
44
+
45
+func (s *SafeStreamCloser) CloseWrite() error {
46
+ s.lock.Lock()
47
+ defer s.lock.Unlock()
48
49
+ // As documented by the quic-go library, this doesn't actually close the entire stream.
50
+ // It prevents further writes, which in turn will result in an EOF signal being sent the other side of stream when
51
+ // reading.
52
+ // We can still read from this stream.
53
+ return s.stream.Close()
54
+}
0 commit comments