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

Fix connecting to Wayland via WAYLAND_SOCKET #358

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

mstoeckl
Copy link
Contributor

@mstoeckl mstoeckl commented Aug 28, 2024

This fixes a crash when swww-daemon is run using a Wayland connection socket provided through the WAYLAND_SOCKET environment variable. (The easiest way of which I am aware to test this is to run waypipe --oneshot ssh localhost swww-daemon). Before this change swww-daemon (commit 886ce3e) would produce the error

thread 'main' panicked at daemon/src/wayland/globals.rs:215:51:
failed to connect to unix socket: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

After this change, it should work (or possibly crash with EWouldBlock at a super::wire::WireMsg::recv().unwrap()), but that's a different issue I don't have time for today.)

The socket fd provided may be produced by socketpair() and
need not have a connectable address.
@LGFae
Copy link
Owner

LGFae commented Sep 7, 2024

Ah, my bad, I thought I had merged this already, but apparently I forgot.

In any case, thanks!

@LGFae LGFae merged commit 2408c0b into LGFae:main Sep 7, 2024
10 checks passed
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.

2 participants