Skip to content

Upload port detector improvements #2288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
If the upload port-detector fails detection, fallback to the user-pro…
…vided port

This will ensure that a port is always returned.
  • Loading branch information
cmaglie committed Aug 31, 2023
commit 54b7b94464aed137e7c16d8570dc0583b5d957db
3 changes: 2 additions & 1 deletion commands/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ func runProgramAction(pme *packagemanager.Explorer,

updatedPort := updatedUploadPort.Await()
if updatedPort == nil {
return nil, nil
// If the algorithms can not detect the new port, fallback to the user-provided port.
return userPort, nil
}
return updatedPort.ToRPC(), nil
}
Expand Down