mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
Fix 'Socket Closed : 104' error on musl systems. Do not raise an error on socket closed if we closed it explicitly. On musl systems, test-pseudotcp was failing consistently due to the closing callback being triggered during the cleanup phase. Closes: https://bugs.gentoo.org/836632 Signed-off-by: Brett A C Sheffield <bacs@librecast.net> Signed-off-by: Sam James <sam@gentoo.org>
31 lines
1001 B
Diff
31 lines
1001 B
Diff
From b2b05e43e1fe90610dac66d2b46d6d2fbf8badf8 Mon Sep 17 00:00:00 2001
|
|
From: Brett A C Sheffield <bacs@librecast.net>
|
|
Date: Tue, 20 Jan 2026 11:27:13 +0000
|
|
Subject: [PATCH] test-pseudotcp: fix socket close error (musl)
|
|
|
|
Do not raise an error on socket closed if we closed it explicitly.
|
|
|
|
On musl systems, test-pseudotcp was failing consistently due to the
|
|
closing callback being triggered during the cleanup phase.
|
|
---
|
|
tests/test-pseudotcp.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/test-pseudotcp.c b/tests/test-pseudotcp.c
|
|
index 0a5f1d1f..3f243120 100644
|
|
--- a/tests/test-pseudotcp.c
|
|
+++ b/tests/test-pseudotcp.c
|
|
@@ -161,7 +161,8 @@ static void writable (PseudoTcpSocket *sock, gpointer data)
|
|
|
|
static void closed (PseudoTcpSocket *sock, guint32 err, gpointer data)
|
|
{
|
|
- g_error ("Socket %p Closed : %d", sock, err);
|
|
+ if (left_closed == FALSE && right_closed == FALSE)
|
|
+ g_error ("Socket %p Closed : %d", sock, err);
|
|
}
|
|
|
|
struct notify_data {
|
|
--
|
|
2.52.0
|
|
|