File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ import (
1010 "github.com/ethereum/go-ethereum/common"
1111 "github.com/ethereum/go-ethereum/core/types"
1212 "github.com/ethereum/go-ethereum/log"
13+ "github.com/ethereum/go-ethereum/rpc"
1314 "github.com/offchainlabs/nitro/arbutil"
1415 "github.com/offchainlabs/nitro/util"
16+ "github.com/pkg/errors"
1517 flag "github.com/spf13/pflag"
1618)
1719
@@ -201,8 +203,10 @@ func (s *L1Reader) broadcastLoop(ctx context.Context) {
201203 clientSubscription , err = s .client .SubscribeNewHead (ctx , inputChannel )
202204 if err != nil {
203205 clientSubscription = nil
204- if time .Now ().After (nextSubscribeErr ) {
205- log .Error ("failed subscribing to header" , "err" , err )
206+ if errors .Is (err , rpc .ErrNotificationsUnsupported ) {
207+ s .config .PollOnly = true
208+ } else if time .Now ().After (nextSubscribeErr ) {
209+ log .Warn ("failed subscribing to header" , "err" , err )
206210 nextSubscribeErr = time .Now ().Add (s .config .SubscribeErrInterval )
207211 }
208212 }
You can’t perform that action at this time.
0 commit comments