Commit 75cb8dc7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2ed6cfd8
...@@ -253,7 +253,7 @@ func (a *Address) neoDecode(b []byte) (uint32, bool) { ...@@ -253,7 +253,7 @@ func (a *Address) neoDecode(b []byte) (uint32, bool) {
if len(b) < 2 { if len(b) < 2 {
return 0, false return 0, false
} }
a.Port = binary.BigEndian.Uint16(b[n:]) a.Port = binary.BigEndian.Uint16(b)
n += 2 n += 2
} else { } else {
a.Port = 0 a.Port = 0
......
...@@ -258,7 +258,7 @@ func TestMsgMarshal(t *testing.T) { ...@@ -258,7 +258,7 @@ func TestMsgMarshal(t *testing.T) {
{CLIENT, Address{}, UUID(CLIENT, 1), RUNNING, 1504466245.925599}}}, {CLIENT, Address{}, UUID(CLIENT, 1), RUNNING, 1504466245.925599}}},
hex("41d66b15517b469d") + u32(1) + hex("41d66b15517b469d") + u32(1) +
u32(2) + u32(0) /* <- ø Address */ + hex("e0000001") + u32(2) + u32(2) + u32(0) /* <- ø Address */ + hex("20000001") + u32(2) +
hex("41d66b15517b3d04"), hex("41d66b15517b3d04"),
}, },
......
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