mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 21:03:54 +08:00
The commita841b28changed the condition for removing job from processing. New flag MultiplexerJobStatus::continue_servicing become used instead of checking pointer for NULL. However for cases when TCPSocket::newJob() returns nullptr the behaviour changed: earlier the job was removed, but after change it is called again, since MultiplexerJobStatus equal to {true, nullptr} means "run this job again". This leads to problem with eating CPU and RAM on linux https://github.com/debauchee/barrier/issues/470 There is similar windows problem, but not sure it is related. https://github.com/debauchee/barrier/issues/552 Since it looks that the goal ofa841b28was only clarifying object ownership and not changing job deletion behaviour, this commit tries to get original behaviour and fix the bugs above by returning {false, nullptr} instead of {true, nullptr} when TCPSocket::newJob() returns nullptr.