Skip to content

Fix bug with misleading idle time, v2 clients#61

Open
ivan-at-ericsson wants to merge 1 commit intoEricsson:masterfrom
ivan-at-ericsson:bug-idle-time-v2
Open

Fix bug with misleading idle time, v2 clients#61
ivan-at-ericsson wants to merge 1 commit intoEricsson:masterfrom
ivan-at-ericsson:bug-idle-time-v2

Conversation

@ivan-at-ericsson
Copy link
Copy Markdown

pafd was reporting v2 clients as active every ~15 seconds due to check_idle() incorrectly calling client_active(). Additionally, v2 clients were receiving idle timeouts when they should have none.

This fix removes the client_active() call for v2 clients in check_idle() and corrects the idle_limit parameter passed to client_connect().

Fixes: #57

pafd was reporting v2 clients as active every ~15 seconds due to
check_idle() incorrectly calling client_active(). Additionally, v2
clients were receiving idle timeouts when they should have none.

This fix removes the client_active() call for v2 clients in check_idle()
and corrects the idle_limit parameter passed to client_connect().

Fixes: Ericsson#57

Signed-off-by: Ivan Bakusic <ivan.bakusic@ericsson.com>"
@ivan-at-ericsson
Copy link
Copy Markdown
Author

not sure if pull-requests emails work so bringing this to @m-ronnblom or @hofors attention. Just in case you like it.

@m-ronnblom
Copy link
Copy Markdown
Collaborator

Could you detail how to reproduce the issue where "v2 clients were receiving idle timeouts when they should have none"?

@ivan-at-ericsson
Copy link
Copy Markdown
Author

I think, and I could be so wrong, that after the initial change in check_idle, one or multiple tests were failing.
But I will double check this again.

@m-ronnblom
Copy link
Copy Markdown
Collaborator

m-ronnblom commented Feb 24, 2026

The 'paf' tests passes before this patch, as does the 'libpaf' tests.

Is this commit AI-generated? I haven't had time to dig into this in detail, but I wanted to make sure you (and not just Codex or some similar tool) had gone through the implications of setting a None idle_limit in sd.py.

From what I recall, "faking" v2 clients as active when checking for idle clients was a bit of a hack, but it served a purpose and the active() call likely can't just be removed. Long time ago, so I could well be wrong here.

@ivan-at-ericsson
Copy link
Copy Markdown
Author

no, I haven't explained myself well.
First, I blindly did the change in check_idle and run the tests, then one/some of them (I assume) failed. Then, again I think, searched for "idle" and "limit" strings which lead to change in 354.
I did this 2 weeks ago, just by searching for bugs in the entire Ericsson/*, checking for (old) "bug" labels, without running the actual application and just trusting the unit tests, since you have plenty of those here. Kudos for that.
I will double check this again and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pafd reports misleading idle time for v2 clients

2 participants