Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c77ed2

Browse filesBrowse files
committed
Extend timeout if candidate port is lost in any case
Even if `waitForUploadPort` is true, we should extend the timeout to allow USB enumeration to complete. In this case we extend by only 1 second instead of 5.
1 parent b4c02b9 commit 7c77ed2
Copy full SHA for 7c77ed2

File tree

1 file changed

+3
-0
lines changed
Filter options

1 file changed

+3
-0
lines changed

‎commands/upload/upload.go

Copy file name to clipboardExpand all lines: commands/upload/upload.go
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ func detectUploadPort(
575575
waitForUploadPort = true
576576
timeout = time.After(5 * time.Second)
577577
log.Debug("User-specified port has been disconnected, now waiting for upload port, timeout extended by 5 seconds")
578+
} else {
579+
timeout = time.After(time.Second)
580+
log.Debug("Candidate port has been disconnected, timeout extended by 1 second")
578581
}
579582
continue
580583
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.