mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[PR #557] [MERGED] Fix infinite loop on fast TCP disconnection #1656
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#1656
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/debauchee/barrier/pull/557
Author: @galkinvv
Created: 2/9/2020
Status: ✅ Merged
Merged: 2/13/2020
Merged by: @AdrianKoshka
Base:
master← Head:fix-loop-tcp-disconnection📝 Commits (1)
c79120cFix infinite loop on fast TCP disconnection📊 Changes
3 files changed (+17 additions, -15 deletions)
View changed files
📝
src/lib/net/SecureSocket.cpp(+2 -2)📝
src/lib/net/TCPSocket.cpp(+13 -12)📝
src/lib/net/TCPSocket.h(+2 -1)📄 Description
The commit
a841b28changed 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 of
a841b28was only clarifyingobject 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.