diff options
author | Hristo Venev <hristo@venev.name> | 2024-04-14 17:37:48 +0300 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2024-04-14 17:37:48 +0300 |
commit | 55f521b355d2ae25f50d26c82ca6aa3fced80063 (patch) | |
tree | d97e4c5992d0ff6f4b575af5d2f82f038db3cb4d | |
parent | 01fabfa25f92424e35ecb4ae98e95a06aa2e278f (diff) |
Keep the lock in `bak_work`
We have it at the start, keep it at the end.
-rw-r--r-- | pgbak.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -391,9 +391,9 @@ static void bak_work(int state) { state = STATE_SNAPSHOT; } lck_write(state); - lck_release(LOCK_STATE); - + if(state == STATE_IDLE) break; + lck_release(LOCK_STATE); if(state == STATE_SNAPSHOT || refresh_ts) { refresh_ts = false; |