Skip to content

Commit db7b3ab

Browse files
BUG: fix that if network protocol is not set on the Slicer MONAILabel client, the connection to the MONAILabel server fails using IP:PORT (#1808)
Signed-off-by: Mauro I. Dominguez <mau_igna_06@hotmail.com> Co-authored-by: SACHIDANAND ALLE <sachidanand.alle@gmail.com>
1 parent b15dae1 commit db7b3ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/slicer/MONAILabel/MONAILabel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,10 @@ def serverUrl(self):
10591059
serverUrl = self.ui.serverComboBox.currentText.strip()
10601060
if not serverUrl:
10611061
serverUrl = "http://127.0.0.1:8000"
1062+
elif not serverUrl.startswith(("http://", "https://")):
1063+
serverUrl = "http://" + serverUrl
1064+
elif serverUrl.startswith(":") or serverUrl.isdigit():
1065+
serverUrl = "http://0.0.0.0:" + serverUrl.lstrip(":")
10621066
return serverUrl.rstrip("/")
10631067

10641068
def saveServerUrl(self):

0 commit comments

Comments
 (0)