Use a different voice close code for session invalidation #3283
Unanswered
MinnDevelopment
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When the main gateway connection is interrupted and the session gets invalidated, the voice gateway closes with code 4014. Instead I would prefer to have a different more specific code for my reconnect logic.
Why This is Needed
Since this code is often used as a sign to not attempt a reconnect, this becomes a problem when trying to reconnect voice connections after a full session reconnect. Usually, when I receive a 4014 close I will simply close the socket and not attempt to reconnect it. However, if the reason for closing is due to main GW, I would want to reconnect it once a new session has been established.
Alternatives Considered
Keep track of all the possible reasons for closing the socket and try to figure it out. Very complicated due to voice kick and eventual consistency.
Additional Details
Beta Was this translation helpful? Give feedback.
All reactions