Add more context to an error
This commit is contained in:
parent
57849844ae
commit
6212973011
|
@ -1116,6 +1116,9 @@ func (c *connection) mainReadLoop() (err error) {
|
|||
if len(msg.Piece) == int(t.chunkSize) {
|
||||
t.chunkPool.Put(&msg.Piece)
|
||||
}
|
||||
if err != nil {
|
||||
err = fmt.Errorf("receiving chunk: %s", err)
|
||||
}
|
||||
case pp.Extended:
|
||||
err = c.onReadExtendedMsg(msg.ExtendedID, msg.ExtendedPayload)
|
||||
case pp.Port:
|
||||
|
|
Loading…
Reference in New Issue