Abort logic fixes

This commit is contained in:
Alex Hultman
2018-10-28 02:08:01 +01:00
parent 99d73a9d65
commit 4059dd644c
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -105,6 +105,13 @@ private:
Super::timeout(HTTP_TIMEOUT_S);
}
/* Remove onAborted function if we reach the end */
if (httpResponseData->offset == totalSize) {
httpResponseData->onAborted = nullptr;
/* Also remove onWritable so that we do not emit when draining behind the scenes. */
httpResponseData->onWritable = nullptr;
}
return success;
}
}