Skip to content

Commit ef67fd1

Browse files
committed
Support remote_addr without port in Orchestrator
1 parent 3e39302 commit ef67fd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/itn_orchestrator/src/discovery.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"errors"
7-
"fmt"
87
"strconv"
98
"strings"
109
"time"
@@ -76,7 +75,8 @@ func discoverParticipantsDo(config Config, params DiscoveryParams, output func(N
7675
}
7776
colonIx := strings.IndexRune(meta.RemoteAddr, ':')
7877
if colonIx < 0 {
79-
return fmt.Errorf("wrong remote address in submission %s: %s", name, meta.RemoteAddr)
78+
// No port is specified in the address, hence we just take the whole remote address field
79+
colonIx = len(meta.RemoteAddr)
8080
}
8181
addr := NodeAddress(meta.RemoteAddr[:colonIx] + ":" + strconv.Itoa(int(meta.GraphqlControlPort)))
8282
if _, has := cache[addr]; has {

0 commit comments

Comments
 (0)