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
This commit is contained in:
gary rong
2018-05-09 16:29:25 +08:00
committed by Péter Szilágyi
parent 4747aad160
commit 4e7dc34ff1
2 changed files with 64 additions and 41 deletions

View File

@ -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()