From df891f0ff44e0d67c4e60bd6f9e03b89a316164e Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 11 Mar 2025 15:36:06 -0400 Subject: [PATCH] sco-tester: Fix closing the socket When writting data the socket shall not be closed until all the data could be transmitted or the test times out. --- tools/sco-tester.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/sco-tester.c b/tools/sco-tester.c index e6888348b..b88631d89 100644 --- a/tools/sco-tester.c +++ b/tools/sco-tester.c @@ -821,6 +821,9 @@ static gboolean sco_connect_cb(GIOChannel *io, GIOCondition cond, errno); err = -errno; } + + /* Don't close the socket until all data is sent */ + g_io_channel_set_close_on_unref(io, FALSE); } if (scodata->shutdown) { -- 2.47.3