diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-26 09:02:00 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-26 09:02:00 -0500 |
commit | 006fc61ecce1ba3d5c7b7163309467c24edbbc46 (patch) | |
tree | 533f5dcd094ebd94d425e64a4261b7b21ec6f3fa /api | |
parent | aaced173f8b3020fbbef236d84b070c2c67ee968 (diff) | |
parent | 2639452967e66c4840164c36817234d3e7c12ac1 (diff) | |
download | chat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.tar.gz chat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.tar.bz2 chat-006fc61ecce1ba3d5c7b7163309467c24edbbc46.zip |
Merge pull request #1505 from mattermost/lib-upgrade
Lib upgrade
Diffstat (limited to 'api')
-rw-r--r-- | api/server.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/api/server.go b/api/server.go index 347f0e2c9..2bab62fac 100644 --- a/api/server.go +++ b/api/server.go @@ -9,15 +9,14 @@ import ( "github.com/gorilla/mux" "github.com/mattermost/platform/store" "github.com/mattermost/platform/utils" - "github.com/throttled/throttled" - throttledStore "github.com/throttled/throttled/store" + "gopkg.in/throttled/throttled.v1" + throttledStore "gopkg.in/throttled/throttled.v1/store" "net/http" "strings" "time" ) type Server struct { - Server *manners.GracefulServer Store store.Store Router *mux.Router } @@ -29,7 +28,6 @@ func NewServer() { l4g.Info("Server is initializing...") Srv = &Server{} - Srv.Server = manners.NewServer() Srv.Store = store.NewSqlStore() Srv.Router = mux.NewRouter() @@ -71,7 +69,7 @@ func StartServer() { } go func() { - err := Srv.Server.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handler) + err := manners.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handler) if err != nil { l4g.Critical("Error starting server, err:%v", err) time.Sleep(time.Second) @@ -84,7 +82,7 @@ func StopServer() { l4g.Info("Stopping Server...") - Srv.Server.Shutdown <- true + manners.Close() Srv.Store.Close() hub.Stop() |