mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
Resolve panic on shutdown with offline eth1 node (#8033)
* Resolve panic on shutdown with offline eth1 node * Move fix tne right place nishant feedback * fix log message Co-authored-by: Nishant Das <nishdas93@gmail.com>
This commit is contained in:
@@ -255,6 +255,10 @@ func (s *Service) Start() {
|
||||
}
|
||||
go func() {
|
||||
s.waitForConnection()
|
||||
if s.ctx.Err() != nil {
|
||||
log.Info("Context closed, exiting pow goroutine")
|
||||
return
|
||||
}
|
||||
s.run(s.ctx.Done())
|
||||
}()
|
||||
}
|
||||
@@ -674,7 +678,6 @@ func (s *Service) initPOWService() {
|
||||
return
|
||||
default:
|
||||
ctx := s.ctx
|
||||
|
||||
header, err := s.eth1DataFetcher.HeaderByNumber(ctx, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to retrieve latest ETH1.0 chain header: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user