Skip to content

Commit

Permalink
fix(test): UDP sockets are not bound. Use shutdown instead of close i…
Browse files Browse the repository at this point in the history
…n check_pubsub_get_state.c
  • Loading branch information
jpfr committed Dec 26, 2023
1 parent 054420c commit 6674813
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/pubsub/check_pubsub_get_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

#include "ua_pubsub.h"
#include "ua_server_internal.h"
#include <check.h>
#include <assert.h>

#include "../plugins/eventloop/posix/eventloop_posix.h"
#include "test_helpers.h"
#include "testing_clock.h"

#include <check.h>
#include <assert.h>

static UA_Server *server = NULL;

/***************************************************************************************************/
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 6674813

Please sign in to comment.