Skip to content

Commit 54b7b94

Browse files
committed
If the upload port-detector fails detection, fallback to the user-provided port
This will ensure that a port is always returned.
1 parent 304d48c commit 54b7b94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commands/upload/upload.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ func runProgramAction(pme *packagemanager.Explorer,
514514

515515
updatedPort := updatedUploadPort.Await()
516516
if updatedPort == nil {
517-
return nil, nil
517+
// If the algorithms can not detect the new port, fallback to the user-provided port.
518+
return userPort, nil
518519
}
519520
return updatedPort.ToRPC(), nil
520521
}

0 commit comments

Comments
 (0)