logger: unlock the mutex for fsync & call fsync only when backend is running
- fsync can be a long blocking operation, so we need to make sure the main logger thread does not block during this time, when it tries to aquire the mutex - fixes calling fsync on an invalid file descriptor
Please register or sign in to comment