udp listener cleanup, add early port listen checks

This commit is contained in:
Jaime Pillora
2020-07-23 01:26:47 +10:00
parent 33fa2010ab
commit e3abdc607e
6 changed files with 54 additions and 16 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ func post(url, body string) (string, error) {
}
func availablePort() string {
l, err := net.Listen("tcp4", "127.0.0.1:0")
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
log.Panic(err)
}