Skip to content

Commit

Permalink
Merge pull request #19 from riklus/master
Browse files Browse the repository at this point in the history
Handling connection error #18
  • Loading branch information
extremecoders-re authored Apr 3, 2022
2 parents 1c4e243 + ed547f8 commit 0f70e53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ func main() {

mutex = &sync.Mutex{}
for {
conn, _ := l.Accept()
go handle_connection(conn, *tunnel)
conn, err := l.Accept()
if err != nil {
log.Println("[WARN] Could not accept connection")
} else {
go handle_connection(conn, *tunnel)
}
}
}

0 comments on commit 0f70e53

Please sign in to comment.