diff --git a/worker/agent.go b/worker/agent.go
index <HASH>..<HASH> 100644
--- a/worker/agent.go
+++ b/worker/agent.go
@@ -74,6 +74,7 @@ func (a *agent) work() {
 		}
 		if inpack, l, err = decodeInPack(data); err != nil {
 			a.worker.err(err)
+			leftdata = data
 			continue
 		}
 		leftdata = nil
keep already received data if not enough to decode