diff --git a/.gitignore b/.gitignore index c22a1447df9..062d376a76b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /test/bin .ipfs +.idea/ \ No newline at end of file diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index bc84f57a44c..ab0d8136434 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -28,11 +28,6 @@ "Comment": "v0.7.3-2-g26709e2", "Rev": "26709e2714106fb8ad40b773b711ebce25b78914" }, - { - "ImportPath": "github.com/braintree/manners", - "Comment": "0.3.1-2-g5280e25", - "Rev": "5280e250f2795914acbeb2bf3b55dd5a2d1fba52" - }, { "ImportPath": "github.com/bren2010/proquint", "Rev": "5958552242606512f714d2e93513b380f43f9991" diff --git a/core/corehttp/corehttp.go b/core/corehttp/corehttp.go index e8852baaf59..9947430d158 100644 --- a/core/corehttp/corehttp.go +++ b/core/corehttp/corehttp.go @@ -8,7 +8,6 @@ import ( "net/http" "time" - manners "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/braintree/manners" ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" manet "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net" core "github.com/ipfs/go-ipfs/core" @@ -62,7 +61,7 @@ func listenAndServe(node *core.IpfsNode, addr ma.Multiaddr, handler http.Handler return err } - server := manners.NewServer() + server := &http.Server{Addr: host, Handler: handler} // if the server exits beforehand var serverError error @@ -72,7 +71,7 @@ func listenAndServe(node *core.IpfsNode, addr ma.Multiaddr, handler http.Handler defer node.Children().Done() go func() { - serverError = server.ListenAndServe(host, handler) + serverError = server.ListenAndServe() close(serverExited) }() @@ -85,9 +84,7 @@ func listenAndServe(node *core.IpfsNode, addr ma.Multiaddr, handler http.Handler log.Infof("server at %s terminating...", addr) // make sure keep-alive connections do not keep the server running - server.InnerServer.SetKeepAlivesEnabled(false) - - server.Shutdown <- true + server.SetKeepAlivesEnabled(false) outer: for {