sdk
sdk copied to clipboard
Attaching twice to the same Fletch VM gives "Connection refused"
$ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704
$ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704
Unable to establish connection to pi2:47704: Connection refused
Of cause the VM on pi2:47704 cannot handle another connection, so the error is sort of correct. However maybe the persistent process can check it is already have a session and provide a better error message.
I think the what should happen is the following:
$ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704
$ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704
Already connected to Fletch VM on pi2:47704; Try running 'fletch disconnect'
@lukechurch WDYT? Is 'fletch disconnect' a thing?
detach?
On Tue, Sep 29, 2015, 16:49 Peter von der Ahé [email protected] wrote:
I think the what should happen is the following:
$ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704 $ fletch/out/DebugX64/fletch attach tcp_socket pi2:47704
Already connected to Fletch VM on pi2:47704; Try running 'fletch disconnect'
@lukechurch https://github.com/lukechurch WDYT? Is 'fletch disconnect' a thing?
— Reply to this email directly or view it on GitHub https://github.com/dart-lang/fletch/issues/158#issuecomment-144083624.
I like detach.
As @lukechurch points out, as long as disconnecting from the Fletch VM isn't a reversible operation, we shouldn't call it detach.
We should change shutdown to shutdown the current session (or all). If no sessions remains after calling shutdown, the persistent process should exit.
Low priority for 0.1.0