summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2021-03-09 01:48:39 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2021-03-09 01:48:39 +0300
commit6433b3f0b4ef519794b4602cde2a91167bb04985 (patch)
treec0b1b3bae022533dea1c237cc8e58c691c019a10 /main.go
parenta5ca191edd3c1d7c2795987d0435849bdd4894fb (diff)
fix listen errorHEADmaster
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 0218d9f..24e3252 100644
--- a/main.go
+++ b/main.go
@@ -2,6 +2,7 @@ package main
import (
"fmt"
+ "errors"
"io"
"log"
"net"
@@ -85,7 +86,8 @@ func listen(host string, min, max int) {
for n := min; n <= max; n++ {
l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", host, n))
if err != nil {
- log.Fatal(err)
+ fmt.Printf("fail %d listen: %s\n", n, errors.Unwrap(err))
+ continue
}
go func(l net.Listener, port int) {