]> Cypherpunks repositories - gostls13.git/commit
net/rpc: don't exit if Accept gets an error
authorRob Pike <r@golang.org>
Wed, 2 Sep 2015 23:05:04 +0000 (16:05 -0700)
committerRob Pike <r@golang.org>
Thu, 3 Sep 2015 21:17:08 +0000 (21:17 +0000)
commit37025536c343642a196f058065f6e3ac121e5473
treec0b3db999e4e4d95967f16d174c5c63b48a5447e
parentd5e32ebf54411432f466bf578c1e305725af8063
net/rpc: don't exit if Accept gets an error

The default implementation of Accept, which spins up a new server
for every new connection, calls log.Fatal if the listener is closed,
stopping any outstanding work. Change that to a non-fatal log
call so work can continue.

There is no programmatic signaling of the problem, just the log,
but that should be enough.

Fixes #11221.

Change-Id: I7c7f6164a0a0143236729eb778d7638c51c34ed1
Reviewed-on: https://go-review.googlesource.com/14185
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/rpc/server.go
src/net/rpc/server_test.go