You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sdjournal: Fixed race conditions in JournalReader.Follow
JournalReader.Follow needs to wait for r.Journal.Wait to return, otherwise
we're opening the door for several race conditions. The JournalReader could
either be re-used or closed while Wait is still running, which seems to
result in undefined behavior. Commonly Wait will return a non-existing,
negative status code in such cases.
Since Wait might return after we stopped reading from waitCh, it's now a
buffered channel of size 1, so it'll never dead-lock in such situations.
Read errors are now correctly propagated to the caller, since err isn't
shadowing the named return value any longer.
We also abort when receiving unknown status codes from Wait now, to prevent
infinitely looping over it.
0 commit comments