Skip to content

Commit

Permalink
mssim: construct the network address correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisccoulson committed Jan 14, 2024
1 parent b238ee2 commit 1e37e3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mssim/mssim.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"fmt"
"io"
"net"
"strconv"
"sync"
"time"

Expand Down Expand Up @@ -69,8 +70,8 @@ func (d *Device) Port() uint {
}

func (d *Device) openInternal() (*Transport, error) {
tpmAddress := fmt.Sprintf("%s:%d", d.Host(), d.Port())
platformAddress := fmt.Sprintf("%s:%d", d.Host(), d.Port()+1)
tpmAddress := net.JoinHostPort(d.Host(), strconv.FormatUint(uint64(d.Port()), 10))
platformAddress := net.JoinHostPort(d.Host(), strconv.FormatUint(uint64(d.Port())+1, 10))

internal := &internalTransport{
locality: 3,
Expand Down

0 comments on commit 1e37e3d

Please sign in to comment.