don't ignore EOF when decoding peer connections

Even when  there are no connections,  we still expect the  decoding to
succeed.
This commit is contained in:
Matthias Radestock committed 2015-01-21 17:44:54 +00:00
1 parent f5a9f07026
commit 04f9fab78b
1 file changed
+2 -2
+2 -2
View File
@@ -305,8 +305,8 @@ func decodePeerNoConns(dec *gob.Decoder) (nameByte []byte, uid uint64, version u
if err = dec.Decode(&version); err != nil {
return
}
if err = dec.Decode(&conns); err == io.EOF {
err = nil
if err = dec.Decode(&conns); err != nil {
return
}
return
}