Skip to content

Commit e44c639

Browse files
cosmo0920edsiper
authored andcommitted
lock: Handle EBUSY error code as retry
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 819c050 commit e44c639

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flb_lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int flb_lock_acquire(flb_lock_t *lock,
4242
result = pthread_mutex_trylock(lock);
4343

4444
if (result != 0) {
45-
if (result == EAGAIN) {
45+
if (result == EAGAIN || result == EBUSY) {
4646
if (retry_limit != FLB_LOCK_INFINITE_RETRY_LIMIT) {
4747
retry_count++;
4848
}

0 commit comments

Comments
 (0)