Skip to content

Commit

Permalink
修复BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
bg5sbk committed Oct 25, 2016
1 parent 1aa2d1d commit 8037474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func (session *Session) RemoveCloseCallback(handler, key interface{}) {
defer session.closeMutex.Unlock()

for i := session.closeCallbacks.Front(); i != nil; i = i.Next() {
item := i.Value.(*closeCallback)
if item.Handler == handler && item.Key == key {
callback := i.Value.(*closeCallback)
if callback.Handler == handler && callback.Key == key {
session.closeCallbacks.Remove(i)
return
}
Expand All @@ -177,7 +177,7 @@ func (session *Session) invokeCloseCallbacks() {
}

for i := session.closeCallbacks.Front(); i != nil; i = i.Next() {
callback := i.Value.(closeCallback)
callback := i.Value.(*closeCallback)
callback.Func()
}
}

0 comments on commit 8037474

Please sign in to comment.