kubo/core
Tor Arne Vestbø 6fe85496f5 corehttp: disable HTTP keep-alive when shutting down server
Once the server is asked to shut down, we stop accepting new
connections, but the 'manners' graceful shutdown will wait for
all existing connections closed to close before finishing.

For keep-alive connections this will never happen unless the
client detects that the server is shutting down through the
ipfs API itself, and closes the connection in response.

This is a problem e.g. with the webui's connections visualization,
which polls the swarm/peers endpoint once a second, and never
detects that the API server was shut down.

We can mitigate this by telling the server to disable keep-alive,
which will add a 'Connection: close' header to the next HTTP
response on the connection. A well behaving client should then
treat that correspondingly by closing the connection.

Unfortunately this doesn't happen immediately in all cases,
presumably depending on the keep-alive timeout of the browser
that set up the connection, but it's at least a step in the
right direction.
2015-04-20 14:55:42 +02:00
..
commands config: change default config dir name to .ipfs 2015-04-20 02:25:41 -07:00
corehttp corehttp: disable HTTP keep-alive when shutting down server 2015-04-20 14:55:42 +02:00
corenet Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
corerepo Move IPNS resolutions into the core library 2015-04-20 01:04:30 -07:00
corerouting Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
coreunix fix for #1008 and other pinning fixes 2015-04-19 23:40:25 -07:00
.gitignore ignore testdb 2014-07-05 15:04:04 -07:00
bootstrap_test.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
bootstrap.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
builder.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
core_test.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
core.go Move IPNS resolutions into the core library 2015-04-20 01:04:30 -07:00
mock.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
pathresolver.go core: resolve error + bounds check 2015-04-20 01:49:22 -07:00