]> Cypherpunks repositories - gostls13.git/commit
net/rpc: shut down connection if gob has error
authorRob Pike <r@golang.org>
Wed, 1 Oct 2014 20:18:44 +0000 (13:18 -0700)
committerRob Pike <r@golang.org>
Wed, 1 Oct 2014 20:18:44 +0000 (13:18 -0700)
commitcd5b785efe3cf67a8e065f8ff2ee8a39badbec40
tree3fe3f1e48e5edc0cc1bdee8e1b00112b3f745208
parent85cdc49e8abed5c48d9b24eedff85e44e38269b9
net/rpc: shut down connection if gob has error
The nicest solution would be to buffer the message and only write
it if it encodes correctly, but that adds considerable memory and
CPU overhead for a very rare condition. Instead, we just shut
down the connection if this happens.
Fixes #7689.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/146670043
src/net/rpc/server.go