1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:54:44 -07:00

netchan: zero out request to ensure correct gob decoding.

Gob decoding does not overwrite fields which are zero
in the encoder.
Fixes #1174.

R=r, r2
CC=golang-dev
https://golang.org/cl/2337044
This commit is contained in:
Roger Peppe 2010-10-11 12:36:16 -07:00 committed by Rob Pike
parent 3d0726b04d
commit 17c9c01912

View File

@ -107,6 +107,7 @@ func (client *expClient) run() {
}
switch hdr.payloadType {
case payRequest:
*req = request{}
if err := client.decode(reqValue); err != nil {
expLog("error decoding client request:", err)
break