Skip to content

Commit

Permalink
close the stream when we get the done signal
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Nov 27, 2024
1 parent 57dfe08 commit 3dd1c14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grpc/optimistic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ func (o *OptimisticServiceV1Alpha1) ExecuteOptimisticBlockStream(stream optimist
return status.Error(codes.DeadlineExceeded, "timed out waiting for mempool to clear after optimistic block execution")
case err := <-mempoolClearingEvent.Err():
return status.Errorf(codes.Internal, "error waiting for mempool clearing event: %v", err)
case err := <-stream.Context().Done():
return status.Errorf(codes.Internal, "stream closed with error: %v", err)
}
}
}
Expand Down

0 comments on commit 3dd1c14

Please sign in to comment.