You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to reconnect after getting StreamTerminatedError?
max_retries=5forretriesinrange(max_retries):
try:
awaitstream.send_message(...)
breakexceptStreamTerminatedErrorase:
if (retries+1) ==max_retries:
raisee# Reconnect hereawaitasyncio.sleep(10)
I wanted to reconnect to the channel and try sending a message again without creating another context or whole stream connection.
Are there any tricks? I just wanted to ensure about sending a specific message.
The text was updated successfully, but these errors were encountered:
Is there any way to reconnect after getting StreamTerminatedError?
I wanted to reconnect to the channel and try sending a message again without creating another context or whole stream connection.
Are there any tricks? I just wanted to ensure about sending a specific message.
The text was updated successfully, but these errors were encountered: