Skip to content

Commit 56e5d9f

Browse files
committed
filetransfer: assert maxQueueSize > 0
A queue size of 0 will cause hanging in the file transfer process.
1 parent 7319060 commit 56e5d9f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/libstore/filetransfer.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,9 @@ struct curlFileTransfer : public FileTransfer
780780

781781
void workerThreadMain()
782782
{
783+
/* NOTE(cole-h): the maxQueueSize needs to be >0 or else things will hang */
784+
assert(maxQueueSize > 0);
785+
783786
/* Cause this thread to be notified on SIGINT. */
784787
#ifndef _WIN32 // TODO need graceful async exit support on Windows?
785788
auto callback = createInterruptCallback([&]() { stopWorkerThread(); });

0 commit comments

Comments
 (0)