complain loudly about vtwrite failure

This commit is contained in:
rsc 2007-04-08 01:33:31 +00:00
parent 4f6d2bb1e8
commit 86190ea39d

View file

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