diff --git a/cmd/megauploader/main.go b/cmd/megauploader/main.go index 625b3ee..5e39bd6 100644 --- a/cmd/megauploader/main.go +++ b/cmd/megauploader/main.go @@ -5,6 +5,9 @@ import ( "fmt" "net/http" "os" + "time" + + "github.com/tylerb/graceful" "git.lattuga.net/boyska/megauploader" ) @@ -34,5 +37,5 @@ func main() { mu := megauploader.MegaUploader{Conf: cfg} mu.SetupRoutes() - http.ListenAndServe(*addr, nil) + graceful.Run(*addr, 15*time.Second, http.DefaultServeMux) }