Skip to content

Commit 41f3226

Browse files
committed
WIP
1 parent 88891cf commit 41f3226

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/libstore/filetransfer.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,12 +654,9 @@ struct curlFileTransfer : public FileTransfer
654654
setup();
655655
}
656656

657-
void tearDown()
657+
void tearDown(Sync<State>::WriteLock & state)
658658
{
659-
{
660-
auto state(state_.lock());
661-
stopWorkerThread(state);
662-
}
659+
stopWorkerThread(state);
663660

664661
workerThread.join();
665662

@@ -669,13 +666,14 @@ struct curlFileTransfer : public FileTransfer
669666

670667
~curlFileTransfer()
671668
{
672-
tearDown();
669+
auto state(state_.lock());
670+
tearDown(state);
673671
}
674672

675673
void restart(Sync<State>::WriteLock state)
676674
{
677675
// Same as destructor
678-
tearDown();
676+
tearDown(state);
679677

680678
// Fresh state, but reuse global mutex
681679
*state = State{};

0 commit comments

Comments
 (0)