1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 01:39:33 +00: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();
}
}