-
Notifications
You must be signed in to change notification settings - Fork 9
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
Command socket does not close if wait for answer fails #21
Comments
Hi @svensp! That's not to say that there is no hyprpy bug there, but I don't have an external monitor currently, so I am unable to test this myself at the moment. What is the value of
If this is the case, then hyprpy should probably also be made to raise an error when you call |
Hi @ulinja,
Another one that would've cause the error was at 0.67 seconds. Simply adding and removing a single monitor does not seem to cause it with my code but adding or removing both external monitors seems to cause it consistent-ish. Wild guess: some kind of mutex in hyprland preventing the workspaces ipc command from being answered while the workspaces are being moved around. Right, my Hyprland version:
Basically hyprland from nix home-manager |
seeing the same issue here:
This occurs when I run instance.get_monitors() in the handler of a monitoradded/monitorremoved event. Using Hyprpy 0.1.10 and Hyprland 0.46.2 on nixos |
If hyprland takes longer than the specified 0.5 seconds to respond to a command sent via the CommandSocket the socket will stay open and the next use of send_command will crash the program.
For me this happens when listening for the
monitorremoved
event which I added in main...svensp:hyprpy:mainand then using instance.get_monitors() inside the handler.
Actual code where the error appears: https://gitlab.com/asterkeks/hyprmonitors/-/blob/main/main.py?ref_type=heads
I don't have a lot of python experience but the following fix works for me: b83da96
The text was updated successfully, but these errors were encountered: