Not calling provider.disconnect()
causes the execution to never end
#6316
Labels
provider.disconnect()
causes the execution to never end
#6316
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();
athttps://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
The text was updated successfully, but these errors were encountered: