Skip to content

Commit de47446

Browse files
Retry streaming subscription on status UNKNOWN as well (dapr#783)
Signed-off-by: Elena Kolevska <[email protected]>
1 parent 87c79dd commit de47446

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: dapr/clients/grpc/subscription.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def next_message(self):
8484
return SubscriptionMessage(message.event_message)
8585
except RpcError as e:
8686
# If Dapr can't be reached, wait until it's ready and reconnect the stream
87-
if e.code() == StatusCode.UNAVAILABLE:
87+
if e.code() == StatusCode.UNAVAILABLE or e.code() == StatusCode.UNKNOWN:
8888
print(
8989
f'gRPC error while reading from stream: {e.details()}, Status Code: {e.code()}'
9090
)

0 commit comments

Comments
 (0)