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

panicked at 'dispatch dropped without returning error' with hyper #106

Closed
Borwe opened this issue Sep 4, 2022 · 4 comments
Closed

panicked at 'dispatch dropped without returning error' with hyper #106

Borwe opened this issue Sep 4, 2022 · 4 comments
Labels
question Further information is requested

Comments

@Borwe
Copy link

Borwe commented Sep 4, 2022

I get this error:
panicked at 'dispatch dropped without returning error', /home/brian/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.20/src/client/conn.rs:329:35

when I do call JsonRpcClient::call(), it happens at random, not always constant. Checking around seems I get this similar issue posted on hyper's github hyperium/hyper#2892, they recommend making the client shareable, also this other project has similar issues: ydb-platform/ydb-rs-sdk#92

@Borwe
Copy link
Author

Borwe commented Sep 4, 2022

The repo I use that causes: https://github.com/Borwe/near-exchanges
Running the tests individually doesn't cause this problem for some reason.

@miraclx
Copy link
Collaborator

miraclx commented Sep 6, 2022

Hi there, so here's the thing. If you're dealing with multiple runtimes, you should not use the same JsonRpcClient connector. So, swap out JsonRpcClient::connect which uses a default, global connector for a manual connector.

- JsonRpcClient::connect(URL);
+ let connector = JsonRpcClient::new_client();
+ let client = connector.connect(URL);

If this helps you, feel free to close the issue.

@miraclx
Copy link
Collaborator

miraclx commented Oct 2, 2022

@Borwe, please let me know if this helps you. Otherwise, I'll be closing this issue in 4 days if there's no update.

@miraclx miraclx added the question Further information is requested label Oct 2, 2022
@miraclx miraclx closed this as completed Nov 15, 2022
@miraclx
Copy link
Collaborator

miraclx commented Nov 15, 2022

Closed. Feel free to reopen if you think your issue is unresolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants