Skip to content

Commit

Permalink
Update inbound_connection.go
Browse files Browse the repository at this point in the history
Signed-off-by: Kapil Sharma <[email protected]>
  • Loading branch information
h4l0gen authored May 7, 2024
1 parent 333e771 commit 029ab42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/helper/inbound_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
var _ = events.Register(InboundConnection)

func InboundConnection(h events.Helper) error {
address, _ := getRandomLocalAddress()
address, _ := getAvailableLocalAddress()
listener, err := net.Listen("tcp", address)
if err != nil {
return err
Expand All @@ -33,7 +33,7 @@ func InboundConnection(h events.Helper) error {
return nil
}

func getRandomLocalAddress() (string, error) {
func getAvailableLocalAddress() (string, error) {
addrs, err := net.InterfaceAddrs()
if err != nil {
return "", err
Expand Down

0 comments on commit 029ab42

Please sign in to comment.