Fail initializing publisher will lead to join non created thread
Function clearing the publisher context SOPC_PubScheduler_Context_Clear
will try to join on sender thread wether it has been created or not. This situation can happen on publisher initialization if there an issue on transport configuration or in message context initialization.
To avoid this check if sender thread has been created before joining it.