Make onAborted unique_function

This commit is contained in:
Alex Hultman
2019-01-17 06:30:47 +01:00
parent 0ca061e772
commit 6718301ac9
3 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -239,10 +239,10 @@ public:
}
/* Attach handler for aborted HTTP request */
HttpResponse *onAborted(std::function<void()> handler) {
HttpResponse *onAborted(fu2::unique_function<void()> &&handler) {
HttpResponseData<SSL> *httpResponseData = getHttpResponseData();
httpResponseData->onAborted = handler;
httpResponseData->onAborted = std::move(handler);
return this;
}