diff options
author | Felix Lange <fjl@twurst.com> | 2015-08-03 08:29:59 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-08-03 22:27:36 +0800 |
commit | ba14957cf3ce8415bd930310a0edd1fce76ddb22 (patch) | |
tree | 84ff7b969fc35da945e3f1b16c03f0df5d22d0e1 /metrics | |
parent | 97cdf848996b9a3aa8b7683b04798452ed8a5cb4 (diff) | |
download | go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar.gz go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar.bz2 go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar.lz go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar.xz go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.tar.zst go-tangerine-ba14957cf3ce8415bd930310a0edd1fce76ddb22.zip |
rpc/comms: use ConnState to track HTTP connections
The JSON-RPC server wraps TCP connections in order to be able to shut
down them down when RPC is stopped. This is rather scary code. Go 1.3
introduced the http.Server.ConnState hook for such purposes. We can use
this facility now that we depend on Go 1.4.
There are multiple reasons for the switch apart from making the code
less scary:
* the TCP listener no longer ticks every second to check a channel
* pending requests are allowed to finish after stopping the server
* we can time out idle keep-alive connections
Diffstat (limited to 'metrics')
0 files changed, 0 insertions, 0 deletions