Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: fix to not convert sec to msec twice (bsc#1222105) #1007

Merged
merged 3 commits into from Apr 3, 2024

Conversation

mtomaschewski
Copy link
Member

Fix to not convert user-timeout in seconds into to timer timeout in millisecond twice.
It caused to wait 1000 times longer when a bridge with stp=on starts and all it's ports
are disconnected and unable to find carrier.

The extra waittime calculated from bridge stp=on
config timings is in seconds, do not convert to
msec timeout yet.
Don't init the --timeout seconds with worker default
timeout constant, which is in msec already.
Also, skip adding bridge stp=on interface setup time
as there is none when we're shutting down interfaces.
Copy link
Collaborator

@rma-x rma-x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me, although it is not always obvious without looking at a larger context which time units are used by a variable or function.

@mtomaschewski mtomaschewski merged commit 9b78f26 into openSUSE:master Apr 3, 2024
@mtomaschewski
Copy link
Member Author

mtomaschewski commented Apr 3, 2024

Looks OK to me, although it is not always obvious without looking at a larger context which time units are used by a variable or function.

There is always room for improvements, but this is out of scope for this issue :-)
The timeouts (msec) are always using ni_timeout_t, the timeout variables in second are unsigned int like "unsigned int second" in the affected code or "unsigned int sec" or uint32_t (e.g. lease times in [binary] dhcp option headers, ...). Finally, stuff closer to the timer is using struct timeval and functions like timercmp in usec...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants