Skip to content

Commit 5727def

Browse files
committed
only send goaway on close
1 parent 8adb9a8 commit 5727def

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

const.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const (
152152
// It's not an implementation choice, the value defined in the specification.
153153
initialStreamWindow = 256 * 1024
154154
maxStreamWindow = 16 * 1024 * 1024
155-
goAwayWaitTime = 5 * time.Second
155+
goAwayWaitTime = 100 * time.Millisecond
156156
)
157157

158158
const (

session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (s *Session) AcceptStream() (*Stream, error) {
290290
// semantics of the underlying net.Conn. For TCP connections, it may be dropped depending on LINGER value or
291291
// if there's unread data in the kernel receive buffer.
292292
func (s *Session) Close() error {
293-
return s.close(ErrSessionShutdown, true, goAwayNormal)
293+
return s.close(ErrSessionShutdown, false, goAwayNormal)
294294
}
295295

296296
// CloseWithError is used to close the session and all streams after sending a GoAway message with errCode.

0 commit comments

Comments
 (0)