Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when terminating web connections. #331

Closed
isaldana opened this issue Jul 24, 2020 · 0 comments · Fixed by #332
Closed

Error when terminating web connections. #331

isaldana opened this issue Jul 24, 2020 · 0 comments · Fixed by #332

Comments

@isaldana
Copy link
Contributor

When calling terminate() on a GRPC web channel the following exception is thrown:

error closing channel: Concurrent modification during iteration: Instance of '_HashSet<XhrTransportStream>'.

Repro steps

  1. Create multiple web streams.
  2. Call terminate() on the GRPC web channel.

Expected result: I expect existing calls and streams to be terminated.

Actual result: An exception is thrown and it looks like existing calls are kept open. The following exception is also displayed.

Details

Error: Bad state: Cannot add event after closing
    at Object.throw_ [as throw] (http://localhost:49717/dart_sdk.js:4330:11)
    at _AsyncStreamController.new.addError (http://localhost:49717/dart_sdk.js:33436:55)
    at ClientCall.new.[_onRequestError] (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:538:26)
    at http://localhost:49717/packages/grpc/src/client/transport/xhr_transport.dart.lib.js:138:27
    at Object._checkAndCall (http://localhost:49717/dart_sdk.js:4540:16)
    at Object.dcall (http://localhost:49717/dart_sdk.js:4545:17)
    at XMLHttpRequest.<anonymous> (http://localhost:49717/dart_sdk.js:104837:21)
    at xhr_transport.XhrTransportStream.new.terminate (http://localhost:49717/packages/grpc/src/client/transport/xhr_transport.dart.lib.js:108:25)
    at terminate.next (<anonymous>)
    at runBody (http://localhost:49717/dart_sdk.js:37387:34)
    at Object._async [as async] (http://localhost:49717/dart_sdk.js:37418:7)
    at xhr_transport.XhrTransportStream.new.terminate (http://localhost:49717/packages/grpc/src/client/transport/xhr_transport.dart.lib.js:106:20)
    at ClientCall.new._terminate (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:571:36)
    at _terminate.next (<anonymous>)
    at runBody (http://localhost:49717/dart_sdk.js:37387:34)
    at Object._async [as async] (http://localhost:49717/dart_sdk.js:37418:7)
    at ClientCall.new.[_terminate] (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:564:22)
    at ClientCall.new._safeTerminate (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:585:35)
    at _safeTerminate.next (<anonymous>)
    at runBody (http://localhost:49717/dart_sdk.js:37387:34)
    at Object._async [as async] (http://localhost:49717/dart_sdk.js:37418:7)
    at ClientCall.new.[_safeTerminate] (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:583:22)
    at ClientCall.new.[_onTimedOut] (http://localhost:49717/packages/grpc/src/client/connection.dart.lib.js:442:29)
    at internalCallback (http://localhost:49717/dart_sdk.js:23542:11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants