Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from filecoin-project/fix/cannot-listen-error
Browse files Browse the repository at this point in the history
fix: improve error reporting when port is in use
  • Loading branch information
bajtos authored Jul 13, 2022
2 parents 615060d + bac721b commit 370088e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ func main() {

nl, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
if err != nil {
panic(err)
fmt.Fprintf(os.Stderr, "Cannot start the webserver: %s\n", err.Error())
os.Exit(4)
}

go func() {
Expand Down

0 comments on commit 370088e

Please sign in to comment.