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

Not calling provider.disconnect() causes the execution to never end #6316

Closed
Muhammad-Altabba opened this issue Jul 27, 2023 · 2 comments
Closed
Assignees
Labels
4.x 4.0 related Bug Addressing a bug Discussion

Comments

@Muhammad-Altabba
Copy link
Contributor

In 4.x, not calling provider.disconnect() causes the execution to never end. This does not seem to be the case for 1.x. If this is an intended behavior it should be documented in the migration guide. And if not it should be fixed.

Expected behavior

To end the execution, even if the WebSocket (and probably IPC) provider did not close, or to document this new behavior and state why it is needed.

Actual behavior

The program execution does not end if a provider was created and provider.disconnect() was not called.

Steps to reproduce the behavior

To check the old behavior: Run the tests at https://github.com/trufflesuite/truffle/ with version 1.x.
And you will see the execution ends.

To see the issue: Repeat with the fork nazarhussain:nh/web3-4x-upgrade but first comment the line provider.disconnect(); at
https://github.com/nazarhussain/truffle/blob/8424d62259ecdde7a29bb302a52b8aea51bf1b58/packages/core/test/lib/console.js#L20.
You will see that the tests never ends.

Logs

No logs, the execution just never ends.

Environment

node: v16.16.0
web3: v4.0.3

@Muhammad-Altabba
Copy link
Contributor Author

This is possibly related to: #6328

@mconnelly8
Copy link

Per 8/22 meeting, low priority.

@luu-alex luu-alex self-assigned this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug Discussion
Projects
None yet
Development

No branches or pull requests

4 participants
@Muhammad-Altabba @luu-alex @mconnelly8 and others