libstore/remote-store: Add checkInterrupt in openConnectionWrapper

This avoids the wall of text like, because ThreadPool doesn't print interrupts
on shutdowns.

error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
error (ignored): opening a connection to remote store 'ssh-ng://127.0.0.1' previously failed
This commit is contained in:
Sergei Zimmerman
2026-01-15 22:32:08 +03:00
parent 9e496f9af2
commit b40b786839

View File

@@ -58,8 +58,13 @@ RemoteStore::RemoteStore(const Config & config)
ref<RemoteStore::Connection> RemoteStore::openConnectionWrapper()
{
if (failed)
if (failed) {
checkInterrupt();
/* Throw Interrupted instead of the following error to silence pesky
warning messages that ThreadPool prints on shutdown if other threads
failed. */
throw Error("opening a connection to remote store '%s' previously failed", config.getHumanReadableURI());
}
try {
return openConnection();
} catch (...) {