dart-lang/spark — pull request #1279 by shepheb (2014-03-10 16:36:41+00:00)
Title: More robust error recovery and better error messages for ADB

Failure to claim the interface due to ADB already running is a common
failure, the error message now suggests this cause.

Also, a failure of that kind would leave the AndroidDevice object
around, but it had failed to connect. Future attempts to push would
result in the bad error message "Connection refused on port 2424", when
really there was no USB interface to send the message on. Now when the
connection fails, the AndroidDevice object is nulled, and future Deploy
attempts will start fresh.

@devoncarew to review.