Implemented in a different way

This commit is contained in:
yhirose 2021-06-02 13:28:49 -04:00
parent 0104614656
commit 5a43bb8149
3 changed files with 55 additions and 7 deletions

View file

@ -266,7 +266,7 @@ svr.Get("/stream", [&](const Request &req, Response &res) {
sink.write(&d[offset], std::min(length, DATA_CHUNK_SIZE));
return true; // return 'false' if you want to cancel the process.
},
[data] { delete data; });
[data](bool success) { delete data; });
});
```