-
Notifications
You must be signed in to change notification settings - Fork 683
Shutting down the Ganache Server v7.0.0 #2185
Comments
Wondering: Is the issue that it doesn't shut down, or that it takes a while to do so? I'd noticed the latter problem, but somehow didn't think to file an issue about it. |
@haltman-at It's actually both. If a client sends a request with a
then the socket connection will never been closed by the client. When MetaMask is open it checks both of those boxes and will keep us from shutting down. Ganache doesn't currently force close long-lived keep alive HTTP sessions when the server is closed, so the Node process remains active until the socket closes on it's own... which sometimes never occurs. We're working on fixing this from a couple of different angles and will update this issue as we do. |
…sponses shall have the underlying connection closed #2185 * This does not yet work in all cases, as uws-js-unofficial fallback does not support .close() * Simple test case added to ensure that after calling close and a single succcessful request, all subsequent requests will fail.
@davidmurdoch I looked into various approaches to responding to this, and pushed an interim change to 54b38e0 Once close() is called, all subsequent responses will have As mentioned in uNetworking/uWebSockets.js#663 (comment) worst case is probably 10s. I wanted to get your feedback on the approach before I pursue this further. |
…sponses shall have the underlying connection closed #2185 * This does not yet work in all cases, as uws-js-unofficial fallback does not support .close() * Simple test case added to ensure that after calling close and a single succcessful request, all subsequent requests will fail.
…trufflesuite#2667) fixes trufflesuite#2185 Co-authored-by: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Platform: macOS Big Sur 11.6
Ganache Version: v7.0.0
Node: v14.17.0
npm: v6.14.13
Description:
Server does not shut down with
Ctrl
+C
Steps to reproduce:
yarn build:test
ganache
Ctrl
+C
to shutdown the serverExpected result:
Ganache Server is shut down
Actual result:
Ganache Server continues running after receiving the shutdown signal
Notes:
Video attachment
Tested the following versions in the screen capture above.
Ganache CLI v6.12.2 (ganache-core: 2.13.2)
ganache v7.0.0 (@ganache/cli: 0.1.1, @ganache/core: 0.1.1)
The text was updated successfully, but these errors were encountered: