-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow multiple read from IPC + some refactor #102
Conversation
that is intentional though. |
Why ? |
reading more can block, besides, there is no point. Just open a new socket connection? |
How can it block ? the only thing that could happen is the client crash right after the data is send (so client doesn't read hyprpaper message) and in that case it crash hyprpaper but it can also happen the old version. Also when the client disconnect it will send a message of 0 char and that is expected, with |
the client can send a message and then do nothing, blocking hyprpaper. |
its the same thing with the old one ? For the old one it will block at line 62 waiting for the data but the new one will block at line 59. Also the old one could crash hyprpaper if you connect but immediately exit because it would try to |
true that... Fine I guess. I'll review this tomorrow. One thing I can definitely say this MR needs is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks!
* Allow multiple read from IPC * bring back old indentation * format with clang-format --------- Co-authored-by: cylian charbonnier <[email protected]>
The previous implementation was closing the connection right after 1 message (ligne 87) so i couldn't send multiple request with the same socket, this fix it.