aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd/vbackup/vbackup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/vbackup/vbackup.c b/src/cmd/vbackup/vbackup.c
index 42e4f7ba..8e7246c3 100644
--- a/src/cmd/vbackup/vbackup.c
+++ b/src/cmd/vbackup/vbackup.c
@@ -450,8 +450,12 @@ myvtwrite(VtConn *z, uchar score[VtScoreSize], uint type, uchar *buf, int n)
{
WriteReq wr;
- if(nwritethread == 0)
- return vtwrite(z, score, type, buf, n);
+ if(nwritethread == 0){
+ n = vtwrite(z, score, type, buf, n);
+ if(n < 0)
+ sysfatal("vtwrite: %r");
+ return n;
+ }
wr.p = packetalloc();
packetappend(wr.p, buf, n);