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

Recover from Resource temporarily unavailable error #193

Open
xf- opened this issue Sep 6, 2024 · 5 comments
Open

Recover from Resource temporarily unavailable error #193

xf- opened this issue Sep 6, 2024 · 5 comments

Comments

@xf-
Copy link

xf- commented Sep 6, 2024

If network is busy or the system is under high load it will throw a warning and a restart of lan-mouse is required.

Error

WARN  lan_mouse::server::emulation_task] input emulation exited: error emulating input: `io error: `Resource temporarily unavailable (os error 11)``

Would be nice to restart the handshake or whatever is at fault so it can recover from such an error.

@feschber
Copy link
Owner

feschber commented Sep 7, 2024

this should prompt you to reenable input emulation like this:
image

is that correct?

It would make sense to try recovering immediately without a prompt in some cases, but I wanted to avoid a situation where it constantly tries to reactivate the input emulation and fails (e.g. when the wayland compositor is terminated).

Will see what I can do.

@xf-
Copy link
Author

xf- commented Sep 7, 2024

I have no libadwaita and run it on cli. Maybe add an option for it. Feels like no retry or do 1 sec 10 sec 30 sec and afterward stop.

cargo build --release --no-default-features --features wayland,xdg_desktop_portal,libei 

@feschber
Copy link
Owner

feschber commented Sep 7, 2024

Ah okay that makes sense, I have not implemented any way of reenabling the emulation via cli (yet).

Some sort of timeout would probably make sense for recoverable errors, yeah

@feschber
Copy link
Owner

by the way: How often does this happen? And it would be good to know what backends are being used.

@xf-
Copy link
Author

xf- commented Sep 10, 2024

by the way: How often does this happen? And it would be good to know what backends are being used.

Depends a lot on circumstances. Most common under high load (system or network). I sometimes feel like the switch is at its limit with 2.5 Gbit.

wayland - wayland

High load: Few seconds or every minute
No load: Never an issue/weeks/months

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

No branches or pull requests

2 participants