Merge pull request #92 from zachzhaozy/add-function-closechan-for-session-module

Add CloseChan function to session module
This commit is contained in:
xtaci
2022-12-01 16:38:55 +08:00
committed by GitHub
+6
View File
@@ -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 {