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:
@@ -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 (...) {
|
||||
|
||||
Reference in New Issue
Block a user