aboutsummaryrefslogtreecommitdiff
path: root/gapii
diff options
context:
space:
mode:
authorBen Clayton <headlessclayton@gmail.com>2015-06-25 18:38:41 +0100
committerBen Clayton <headlessclayton@gmail.com>2015-06-25 18:38:41 +0100
commit3cc499e46bb007e2beb1ecf44219b3a0af3e0a28 (patch)
tree8a34679cf9404e8a5876a6b5a4c693513c37af4d /gapii
parent51fff0e1b939fbfe7839f22aad6645fab7bb298a (diff)
downloadgpu-3cc499e46bb007e2beb1ecf44219b3a0af3e0a28.tar.gz
Fix logic so that the app can be started after pressing 'Capture...'
This got broken with the move to the gapii package. Change-Id: I58acb49dc8ee146ef557f9e3ed471d3c4c894a17
Diffstat (limited to 'gapii')
-rw-r--r--gapii/capture.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/gapii/capture.go b/gapii/capture.go
index 1b899d8c0..41ef2230f 100644
--- a/gapii/capture.go
+++ b/gapii/capture.go
@@ -62,7 +62,7 @@ func capture(logger log.Logger, port int, w io.Writer, stop chan struct{}) (int6
}
conn, err := net.Dial("tcp", fmt.Sprintf("localhost:%d", port))
if err != nil {
- return 0, err
+ return 0, nil // Treat failure-to-connect as target-not-ready instead of an error.
}
defer conn.Close()
var count, nextSize siSize
@@ -114,7 +114,6 @@ func Capture(logger log.Logger, port int, w io.Writer, stop chan struct{}) (int6
// ADB has an annoying tendancy to insta-close forwarded sockets when
// there's no application waiting for the connection. Treat this as
// another waiting-for-connection case.
- logger.Infof("Pausing...")
select {
case <-stop:
logger.Infof("Aborted.")