Skip to content

Commit 2883e0e

Browse files
committed
Allow EventSubscriber to re-connect on codes.Unavailable errors
1 parent b7aa7bc commit 2883e0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/ingestion/event_subscriber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (r *RPCEventSubscriber) subscribe(ctx context.Context, height uint64) <-cha
224224
// we can get not found when reconnecting after a disconnect/restart before the
225225
// next block is finalized. just wait briefly and try again
226226
time.Sleep(200 * time.Millisecond)
227-
case codes.DeadlineExceeded, codes.Internal:
227+
case codes.DeadlineExceeded, codes.Internal, codes.Unavailable:
228228
// these are sometimes returned when the stream is disconnected by a middleware or the server
229229
default:
230230
// skip reconnect on all other errors

0 commit comments

Comments
 (0)