Error assignment fix

This commit is contained in:
Lasse Johnsen 2021-07-02 16:05:08 +01:00
parent e5d5d443ff
commit af49ef4b87
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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