Commit Diff


commit - aaf972e2369e5926a83162de108b6826f44e4a48
commit + 34cd2d9587b79912669c8bb19b54ab7a7b0b4828
blob - 6ed2c6c11517435fbb047b798fd071791c29d995
blob + ee38a8cc66e5006ea0943dbbdd1e278ab7549fd3
--- lib/serve.c
+++ lib/serve.c
@@ -1105,10 +1105,12 @@ recv_packfile(struct imsg *imsg, int infd)
 			/* Detect gotd(8) closing the pack pipe when done. */
 			err = got_poll_fd(packfd, 0, 1);
 			if (err) {
-				if (err->code != GOT_ERR_EOF)
+				if (err->code != GOT_ERR_TIMEOUT &&
+				    err->code != GOT_ERR_EOF)
 					break;
+				if (err->code == GOT_ERR_EOF)
+					pack_done = 1;
 				err = NULL;
-				pack_done = 1;
 			}
 		} else {
 			/* Write pack data and/or detect pipe being closed. */