sbt / sbt-remote-control

Create and manage sbt process using unicorns and forks
Other
74 stars 14 forks source link

Do not call SimpleConnector closeHandler if we never connect #117

Closed havocp closed 10 years ago

havocp commented 10 years ago

This caused on assertion failure on failure to connect.

The problem here was that we did Future.sequence(done,closed).onComplete(closeHandler), but if any future in the sequence fails we immediately complete the whole sequence, so the closeHandler would run on failure to connect.

Changing onComplete to onSuccess would probably be enough to fix this but I rewrote the code to be more explicit. The explicit code should more clearly do the right thing without relying on many guarantees about how Future works.

jsuereth commented 10 years ago

LGTM