Skip to content

Commit

Permalink
Merge pull request #92 from zachzhaozy/add-function-closechan-for-ses…
Browse files Browse the repository at this point in the history
…sion-module

Add CloseChan function to session module
  • Loading branch information
xtaci committed Dec 1, 2022
2 parents 09e2c01 + c76d829 commit 089fd28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ func (s *Session) Close() error {
}
}

// CloseChan can be used by someone who wants to be notified immediately when this
// session is closed
func (s *Session) CloseChan() <-chan struct{} {
return s.die
}

// notifyBucket notifies recvLoop that bucket is available
func (s *Session) notifyBucket() {
select {
Expand Down

0 comments on commit 089fd28

Please sign in to comment.