Browse Source

Merge pull request #263 from silasdavis/fix-unsubscribe

Fix unsubscribe
pull/261/merge
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
7df79d9339
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      rpc/core/events.go

+ 1
- 1
rpc/core/events.go View File

@ -20,6 +20,6 @@ func Subscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultSubscri
func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error) { func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error) {
log.Notice("Unsubscribe to event", "remote", wsCtx.GetRemoteAddr(), "event", event) log.Notice("Unsubscribe to event", "remote", wsCtx.GetRemoteAddr(), "event", event)
wsCtx.GetEventSwitch().RemoveListener(event)
wsCtx.GetEventSwitch().RemoveListenerForEvent(event, wsCtx.GetRemoteAddr())
return &ctypes.ResultUnsubscribe{}, nil return &ctypes.ResultUnsubscribe{}, nil
} }

Loading…
Cancel
Save