Skip to content

Commit

Permalink
disable finalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Nov 19, 2024
1 parent 3941a4e commit 56edb24
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ func (s *Session) OpenStream() (*Stream, error) {
default:
s.streams[sid] = stream
wrapper := &Stream{stream: stream}
runtime.SetFinalizer(wrapper, func(s *Stream) {
s.Close()
})
// NOTE(x): disabled finalizer for issue #997
/*
runtime.SetFinalizer(wrapper, func(s *Stream) {
s.Close()
})
*/
return wrapper, nil
}
}
Expand Down

0 comments on commit 56edb24

Please sign in to comment.