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
Avoid invalid state when a connect failed (grpc#1739)
Motivation:
The connection manager gets notified when a connect attempt fails and
expected to be in the connecting state. Any other state is invalid and
will lead to an assertion failure.
The manager is notified of connection failures via the channel promise
and via the handler (i.e. on `errorCaught(context:error:)`). However,
connection failures lead to a state change and will result in crashes in
debug builds if a notification is received via both paths.
Modifications:
- Ignore errors from the channel while in the connecting state and only
listen errors from the channel promise callback.
- Add test
Result:
Fewer crashes.
0 commit comments