Skip to content

Commit

Permalink
fix(pubsub): Close the correct connection in UA_WriterGroup_disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Sep 11, 2024
1 parent ebe5e42 commit 1c9116d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pubsub/ua_pubsub_eventloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ UA_WriterGroup_disconnect(UA_WriterGroup *wg) {
if(wg->sendChannel == 0)
return;
UA_PubSubConnection *c = wg->linkedConnection;
c->cm->closeConnection(c->cm, c->sendChannel);
if(!c || !c->cm)
return;
c->cm->closeConnection(c->cm, wg->sendChannel);
}

UA_StatusCode
Expand Down

0 comments on commit 1c9116d

Please sign in to comment.