1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

Simplify wake up of task (#1826)

This commit is contained in:
Juan Aguilar 2020-12-12 21:07:06 +01:00 committed by GitHub
parent ae63eb8bb2
commit 542db82282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -182,9 +182,7 @@ impl Inner {
self.len += data.len();
self.items.push_back(data);
self.need_read = self.len < MAX_BUFFER_SIZE;
if let Some(task) = self.task.take() {
task.wake()
}
self.task.wake();
}
#[cfg(test)]

View File

@ -725,9 +725,7 @@ impl Drop for Safety {
if Rc::strong_count(&self.payload) != self.level {
self.clean.set(true);
}
if let Some(task) = self.task.take() {
task.wake()
}
self.task.wake();
}
}