mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:45:59 +01:00
Fix broken pipe crash when event listener terminates (#2339)
This commit is contained in:
parent
5627b70981
commit
9f8c5cb63c
1 changed files with 3 additions and 1 deletions
|
@ -108,7 +108,9 @@ void CEventManager::flushEvents() {
|
|||
for (auto& ev : m_dQueuedEvents) {
|
||||
std::string eventString = (ev.event + ">>" + ev.data).substr(0, 1022) + "\n";
|
||||
for (auto& fd : m_dAcceptedSocketFDs) {
|
||||
write(fd.first, eventString.c_str(), eventString.length());
|
||||
try {
|
||||
write(fd.first, eventString.c_str(), eventString.length());
|
||||
} catch(...) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue