Reopen pipe path on EOF

This commit is contained in:
patrick96 2021-09-13 19:56:24 +02:00 committed by Patrick Ziegler
parent 77b9cffaf8
commit 386eb57ba7
5 changed files with 53 additions and 38 deletions
src/components

View file

@ -260,7 +260,7 @@ void controller::read_events(bool confwatch) {
if (m_ipc) {
eloop->pipe_handle(
m_ipc->get_file_descriptor(), [this](const string payload) { m_ipc->receive_data(payload); },
m_ipc->get_path(), [this](const string payload) { m_ipc->receive_data(payload); },
[this]() { m_ipc->receive_eof(); },
[this](int err) { m_log.err("libuv error while listening to IPC channel: %s", uv_strerror(err)); });
}