mirror of
https://github.com/xtaci/smux.git
synced 2024-04-21 10:51:48 +00:00
Merge pull request #92 from zachzhaozy/add-function-closechan-for-session-module
Add CloseChan function to session module
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user