Align getting sendData with its jsvUnLock

Both the sendData jsvObjectGetChild() and jsvUnLock() are in the
same `if (!connectionCloseNow)` code block.
This commit is contained in:
Standa Opichal 2017-06-30 14:06:21 +02:00
parent 52c743fce3
commit 1e32a11e0a

View File

@ -487,8 +487,8 @@ bool socketClientConnectionsIdle(JsNetwork *net) {
if (hadHeaders)
socketClientPushReceiveData(connection, socket, &receiveData);
JsVar *sendData = jsvObjectGetChild(connection,HTTP_NAME_SEND_DATA,0);
if (!closeConnectionNow) {
JsVar *sendData = jsvObjectGetChild(connection,HTTP_NAME_SEND_DATA,0);
// send data if possible
if (sendData && !jsvIsEmptyString(sendData)) {
// don't try to send if we're already in error state