From b8e27cc02bdca36df6af184d48679e155850b8e9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 2 Mar 2026 12:22:30 +0100 Subject: [PATCH] modules: IO_HUP also has an error --- src/modules/module-raop/rtsp-client.c | 3 +-- src/modules/module-sendspin/websocket.c | 3 +-- src/modules/module-snapcast-discover.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/module-raop/rtsp-client.c b/src/modules/module-raop/rtsp-client.c index 574f9f3e4..ff487388c 100644 --- a/src/modules/module-raop/rtsp-client.c +++ b/src/modules/module-raop/rtsp-client.c @@ -446,8 +446,7 @@ on_source_io(void *data, int fd, uint32_t mask) if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { socklen_t len = sizeof(res); - if ((mask & SPA_IO_HUP) || - getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) res = -EPIPE; else res = -res; diff --git a/src/modules/module-sendspin/websocket.c b/src/modules/module-sendspin/websocket.c index e0d5a717d..d1d234bd9 100644 --- a/src/modules/module-sendspin/websocket.c +++ b/src/modules/module-sendspin/websocket.c @@ -713,8 +713,7 @@ on_source_io(void *data, int fd, uint32_t mask) if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { socklen_t len = sizeof(res); - if ((mask & SPA_IO_HUP) || - getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) res = -EPIPE; else res = -res; diff --git a/src/modules/module-snapcast-discover.c b/src/modules/module-snapcast-discover.c index 0e9fef1a1..d00a558a5 100644 --- a/src/modules/module-snapcast-discover.c +++ b/src/modules/module-snapcast-discover.c @@ -382,8 +382,7 @@ on_source_io(void *data, int fd, uint32_t mask) if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { socklen_t len = sizeof(res); - if ((mask & SPA_IO_HUP) || - getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) + if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0) res = -EPIPE; else res = -res;