diff --git a/examples/multipro/echo.go b/examples/multipro/echo.go index eda40883..e9b58bcf 100644 --- a/examples/multipro/echo.go +++ b/examples/multipro/echo.go @@ -48,7 +48,7 @@ func (e *EchoProtocol) onEchoRequest(s network.Stream) { s.Close() // unmarshal it - proto.Unmarshal(buf, data) + err = proto.Unmarshal(buf, data) if err != nil { log.Println(err) return @@ -101,7 +101,7 @@ func (e *EchoProtocol) onEchoResponse(s network.Stream) { s.Close() // unmarshal it - proto.Unmarshal(buf, data) + err = proto.Unmarshal(buf, data) if err != nil { log.Println(err) return diff --git a/examples/multipro/ping.go b/examples/multipro/ping.go index bb982c1e..43666bc9 100644 --- a/examples/multipro/ping.go +++ b/examples/multipro/ping.go @@ -45,7 +45,7 @@ func (p *PingProtocol) onPingRequest(s network.Stream) { s.Close() // unmarshal it - proto.Unmarshal(buf, data) + err = proto.Unmarshal(buf, data) if err != nil { log.Println(err) return @@ -96,7 +96,7 @@ func (p *PingProtocol) onPingResponse(s network.Stream) { s.Close() // unmarshal it - proto.Unmarshal(buf, data) + err = proto.Unmarshal(buf, data) if err != nil { log.Println(err) return