Commit 17c9c019 authored by Roger Peppe's avatar Roger Peppe Committed by Rob Pike

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
parent 3d0726b0
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment