5553caa35ac431614c6dbde7242f0495152c3058 markd Tue Dec 11 07:11:25 2018 -0800 opps, checked in debugging test with comments. SORRY diff --git src/lib/udc.c src/lib/udc.c index 8568fef..ee2b2eb 100644 --- src/lib/udc.c +++ src/lib/udc.c @@ -217,31 +217,31 @@ if (rd < 0) errnoAbort("udcReadAndIgnore: error reading socket after %lld bytes", total); remaining -= rd; total += rd; } if (total < size) errAbort("udcReadAndIgnore: got EOF at %lld bytes (wanted %lld)", total, size); } static int connInfoGetSocket(struct udcFile *file, char *url, bits64 offset, int size) /* If ci has an open socket and the given offset matches ci's current offset, * reuse ci->socket. Otherwise close the socket, open a new one, and update ci, * or return -1 if there is an error opening a new one. */ { struct connInfo *ci = &file->connInfo; -if (FALSE&& ci != NULL && ci->socket > 0 && ci->offset != offset) +if (ci != NULL && ci->socket > 0 && ci->offset != offset) { bits64 skipSize = (offset - ci->offset); if (skipSize > 0 && skipSize <= MAX_SKIP_TO_SAVE_RECONNECT) { verbose(4, "!! skipping %lld bytes @%lld to avoid reconnect\n", skipSize, ci->offset); udcReadAndIgnore(&file->ios.net, ci->socket, skipSize); ci->offset = offset; file->ios.numReuse++; } else { verbose(4, "Offset mismatch (ci %lld != new %lld), reopening.\n", ci->offset, offset); mustCloseFd(&(ci->socket)); if (ci->ctrlSocket > 0) mustCloseFd(&(ci->ctrlSocket));