minor fix;

This commit is contained in:
Alexander Vdolainen 2015-07-20 20:36:00 +03:00
parent 847ce7b54e
commit 4d10b4dc86

View File

@ -208,14 +208,15 @@ int _sntll_writemsg(conn_t *co, sxmsg_t *msg)
if(rd < 0) {
co->flags |= SNSX_CLOSED;
r = SNE_ESSL;
} else if(head->payload_length) rd = __conn_write(co, msg->payload, head->payload_length);
/* check up again */
if(rd < 0) {
co->flags |= SNSX_CLOSED;
r = SNE_ESSL;
} else if(head->payload_length) {
rd = __conn_write(co, msg->payload, head->payload_length);
/* check up again */
if(rd < 0) { co->flags |= SNSX_CLOSED; r = SNE_ESSL; }
}
pthread_mutex_unlock(&co->sslinout[2]);
if(!(co->flags & SNSX_CLOSED)) r = SNE_SUCCESS;
return r;
}