graceful stop
not really tested
This commit is contained in:
parent
c640ec47ac
commit
c8e002b5c4
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue