Skip to content

Commit

Permalink
chore(refactor): removed unused method GetFreePort
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed May 18, 2017
1 parent a4ef1a6 commit 69ed22a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions protocol/tcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,22 +212,6 @@ func waitForPort(port int, t *testing.T) {
}
}

// GetFreePort Gets an available port by asking the kernal for a random port
// ready and available for use.
func GetFreePort() int {
addr, err := net.ResolveTCPAddr("tcp", ":0")
if err != nil {
return 0
}

l, err := net.ListenTCP("tcp", addr)
if err != nil {
return 0
}
defer l.Close()
return l.Addr().(*net.TCPAddr).Port
}

func TestTCPProxy_pipe(t *testing.T) {
}

Expand Down

0 comments on commit 69ed22a

Please sign in to comment.