From 66748139987dc84a890e4e5d64a2ecc1c6856fba Mon Sep 17 00:00:00 2001 From: Julius Pfrommer Date: Tue, 26 Dec 2023 13:36:48 +0100 Subject: [PATCH] fix(test): UDP sockets are not bound. Use shutdown instead of close in check_pubsub_get_state.c --- tests/pubsub/check_pubsub_get_state.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/pubsub/check_pubsub_get_state.c b/tests/pubsub/check_pubsub_get_state.c index ea39172be66..34e1fd4ece8 100644 --- a/tests/pubsub/check_pubsub_get_state.c +++ b/tests/pubsub/check_pubsub_get_state.c @@ -11,12 +11,14 @@ #include "ua_pubsub.h" #include "ua_server_internal.h" -#include -#include +#include "../plugins/eventloop/posix/eventloop_posix.h" #include "test_helpers.h" #include "testing_clock.h" +#include +#include + static UA_Server *server = NULL; /***************************************************************************************************/ @@ -488,7 +490,7 @@ START_TEST(Test_error_case) { UA_PubSubConnection *tmpConnection; TAILQ_FOREACH(tmpConnection, &server->pubSubManager.connections, listEntry) { if(UA_NodeId_equal(&tmpConnection->identifier, &ConnId_1)) { - close((int)tmpConnection->sendChannel); + shutdown((int)tmpConnection->sendChannel, UA_SHUT_RDWR); } }