Skip to content

Commit

Permalink
Fix OG panic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Sep 25, 2023
1 parent cc741c3 commit 253077c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions go/rpc/encrypted_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,18 @@ func (c *EncRPCClient) forwardLogs(clientChannel chan common.IDAndEncLog, logCh
}

case err := <-subscription.Err():
if err != nil {
c.logger.Info("subscription closed", log.ErrKey, err)
} else {
c.logger.Trace("subscription closed")
if c == nil {
panic("c is nill")
}
if c.logger == nil {
panic("c.logger is nill")
}
if subscription == nil {
panic("subscription is nil")
}

c.logger.Info("subscription closed", log.ErrKey, err)

return
}
}
Expand Down

0 comments on commit 253077c

Please sign in to comment.