mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
mononoke: edenapi: Add a comment to prevent a memory leak from being reintroduced
Summary:
There was a memory leak in EdenAPI server caused by cloning `rctx` and
passing it into the error logging task. D26451527 (de46828572
) fixed the memory leak.
Add a comment to warn others so that the memory leak isn't reintroduced.
Reviewed By: farnz
Differential Revision: D26459153
fbshipit-source-id: e6b5a97e511144f93dfdd29caa6f4c92d54be957
This commit is contained in:
parent
bbf475a1e7
commit
315fb0613b
@ -45,6 +45,9 @@ impl RequestContext {
|
||||
};
|
||||
|
||||
// Spawn error logging task.
|
||||
//
|
||||
// NOTE: Make sure that rctx isn't cloned and then moved into this task as it will lead to
|
||||
// a memory leak due to error_rx never returning None. See D26451527 for more information.
|
||||
let _ = tokio::spawn({
|
||||
cloned!(rctx.logger);
|
||||
async move {
|
||||
|
Loading…
Reference in New Issue
Block a user