diff options
author | gary rong <garyrong0905@gmail.com> | 2018-05-09 16:29:25 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-09 16:29:25 +0800 |
commit | 4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662 (patch) | |
tree | db18a5c1ae26e2ad0bfa8c9521aee0f2c205ec03 /event | |
parent | 4747aad160ed3721a70a133105c474cb3b66519e (diff) | |
download | dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar.gz dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar.bz2 dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar.lz dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar.xz dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.tar.zst dexon-4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662.zip |
eth/filter: check nil pointer when unsubscribe (#16682)
* eth/filter: check nil pointer when unsubscribe
* eth/filters, accounts, rpc: abort system if subscribe failed
* eth/filter: add crit log before exit
* eth/filter, event: minor fixes
Diffstat (limited to 'event')
-rw-r--r-- | event/event.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/event/event.go b/event/event.go index 20d20d1f5..423278731 100644 --- a/event/event.go +++ b/event/event.go @@ -180,6 +180,12 @@ func (s *TypeMuxSubscription) Unsubscribe() { s.closewait() } +func (s *TypeMuxSubscription) Closed() bool { + s.closeMu.Lock() + defer s.closeMu.Unlock() + return s.closed +} + func (s *TypeMuxSubscription) closewait() { s.closeMu.Lock() defer s.closeMu.Unlock() |