summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-23 16:55:16 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-23 16:55:16 +0100
commitd971033f6bbb27e8ada96660c863875f48496ed4 (patch)
treefa8dbe646f2fdc75a9be1f79a954def8d35ca9c8
parent0ab0c01490bd1452c44ec501dfb68e8f6ac03eb1 (diff)
parentec9ffa2cdd931d8ab8ac0d90b1d9eff180a07288 (diff)
Merge pull request #2708 from vcaputo/journal-restore-offline-state-on-error
journal: restore offline state on error
-rw-r--r--src/journal/journal-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 7abdceb690..bed825cdc3 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -238,8 +238,10 @@ int journal_file_set_offline(JournalFile *f, bool wait) {
journal_file_set_offline_internal(f);
else {
r = pthread_create(&f->offline_thread, NULL, journal_file_set_offline_thread, f);
- if (r > 0)
+ if (r > 0) {
+ f->offline_state = OFFLINE_JOINED;
return -r;
+ }
}
return 0;