mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
p2p: actually encode as RLP list (will squash)
This commit is contained in:
parent
5a2b9bde72
commit
9950b419ad
1 changed files with 1 additions and 2 deletions
|
|
@ -120,8 +120,7 @@ func (t *rlpxTransport) close(err error) {
|
||||||
if err := t.conn.SetWriteDeadline(deadline); err == nil {
|
if err := t.conn.SetWriteDeadline(deadline); err == nil {
|
||||||
// Connection supports write deadline.
|
// Connection supports write deadline.
|
||||||
t.wbuf.Reset()
|
t.wbuf.Reset()
|
||||||
size, reader, _ := rlp.EncodeToReader(reason)
|
rlp.Encode(&t.wbuf, []interface{}{reason})
|
||||||
io.CopyN(&t.wbuf, reader, int64(size))
|
|
||||||
t.conn.Write(discMsg, t.wbuf.Bytes())
|
t.conn.Write(discMsg, t.wbuf.Bytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue