merge
This commit is contained in:
commit
3e52ada202
1 changed files with 5 additions and 2 deletions
|
@ -178,7 +178,7 @@ Restart:
|
|||
failed = 0;
|
||||
lostsync = 0;
|
||||
while (!done) {
|
||||
if (failed) {
|
||||
if (netfd < 0 || failed) {
|
||||
// Wait for the netreader to die.
|
||||
while (netfd >= 0) {
|
||||
dmessage(1, "main; waiting for netreader to die\n");
|
||||
|
@ -208,7 +208,7 @@ Restart:
|
|||
}
|
||||
|
||||
if(++lostsync > 2){
|
||||
dmessage(2, "main; lost sync\n");
|
||||
syslog(0, Logname, "connection seems hung up...");
|
||||
failed = 1;
|
||||
continue;
|
||||
}
|
||||
|
@ -218,6 +218,9 @@ Restart:
|
|||
case Unsent:
|
||||
sendp(unacked, b);
|
||||
|
||||
if (netfd < 0)
|
||||
break;
|
||||
|
||||
PBIT32(b->hdr.acked, inmsg);
|
||||
|
||||
if (writen(netfd, (uchar *)&b->hdr, Hdrsz) < 0) {
|
||||
|
|
Loading…
Reference in a new issue