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
I'm using Swift gRPC on iOS and trying to keep connection when device switches between wifi<>cellular or different cellular technologies as suggested here #337.
So I shutdown active service client channel. And next time I talk to client, I want to check whether it's shutdown or not, so I can decide if I need to create new client or use the current one.
The only way to do it AFAIK is to call its channel's connectivityState method.
But I get EXC_BAD_ACCESS when calling it, after channel was shutdown.
I suppose it happens after underlying channel pointer is freed in shutdown method and I try to access if afterwards in connectivityState method.
I don't know much about implementation details whether we should keep underlying channel pointer alive so we can keep using it to get its state, or whether we should rely on some secondary knowledge if it was shutdown like hasBeenShutdown private flag, so I couldn't create PR to fix it.
Environment
Key
Value
OS Version
10.14.4
Swift Version
4.2
Xcode Version
10.2.1
gRPC-Swift Version
0.9.0
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Issue Description
I'm using Swift gRPC on iOS and trying to keep connection when device switches between wifi<>cellular or different cellular technologies as suggested here #337.
So I shutdown active service client channel. And next time I talk to client, I want to check whether it's shutdown or not, so I can decide if I need to create new client or use the current one.
The only way to do it AFAIK is to call its channel's
connectivityState
method.But I get
EXC_BAD_ACCESS
when calling it, after channel was shutdown.I suppose it happens after underlying channel pointer is freed in
shutdown
method and I try to access if afterwards inconnectivityState
method.I don't know much about implementation details whether we should keep underlying channel pointer alive so we can keep using it to get its state, or whether we should rely on some secondary knowledge if it was shutdown like
hasBeenShutdown
private flag, so I couldn't create PR to fix it.Environment
The text was updated successfully, but these errors were encountered: