- IsoClientConnection_associateAsync: added check if socket creation has been successful

pull/119/head
Michael Zillgith 7 years ago
parent 46f87a1656
commit 6af7973b09

@ -636,6 +636,11 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
bool
IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTimeoutInMs)
{
self->socket = TcpSocket_create();
if (self->socket == NULL)
return false;
bool success = true;
/* Create socket and start connect */
@ -643,8 +648,6 @@ IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTim
Semaphore_wait(self->tickMutex);
self->socket = TcpSocket_create();
#if (CONFIG_ACTIVATE_TCP_KEEPALIVE == 1)
Socket_activateTcpKeepAlive(self->socket,
CONFIG_TCP_KEEPALIVE_IDLE,

Loading…
Cancel
Save