Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into lint
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Dec 16, 2024
2 parents b71e5f6 + 273d879 commit 0eab4b0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,14 @@ func main() {
}
})

log.Fatal(http.ListenAndServe(":"+port, r))
srv := http.Server{
Addr: ":" + port,
WriteTimeout: 1 * time.Second,
ReadTimeout: 1 * time.Second,
Handler: r,
}

if err := srv.ListenAndServe(); err != nil {
log.Fatalw("Server failed", zap.Error(err))
}
}

0 comments on commit 0eab4b0

Please sign in to comment.