mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 21:37:58 +03:00
wip
This commit is contained in:
parent
f46d69ffea
commit
1eaaeb2be7
1 changed files with 8 additions and 6 deletions
|
@ -149,10 +149,12 @@ where
|
||||||
// spawn current publish future to runtime
|
// spawn current publish future to runtime
|
||||||
// so it could complete error handling
|
// so it could complete error handling
|
||||||
let st = ready!(inner.poll_request(cx));
|
let st = ready!(inner.poll_request(cx));
|
||||||
if let State::CallPublish { fut } =
|
if inner.payload.is_some() {
|
||||||
mem::replace(&mut *this.st, State::ReadRequest)
|
if let State::CallPublish { fut } =
|
||||||
{
|
mem::replace(&mut *this.st, State::ReadRequest)
|
||||||
crate::rt::spawn(fut);
|
{
|
||||||
|
crate::rt::spawn(fut);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
st
|
st
|
||||||
}
|
}
|
||||||
|
@ -350,7 +352,7 @@ where
|
||||||
.io
|
.io
|
||||||
.encode(Message::Item((msg, body.size())), &self.codec)
|
.encode(Message::Item((msg, body.size())), &self.codec)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
if let Some(mut payload) = self.payload.take() {
|
if let Some(ref mut payload) = self.payload {
|
||||||
payload.1.set_error(PayloadError::Incomplete(None));
|
payload.1.set_error(PayloadError::Incomplete(None));
|
||||||
}
|
}
|
||||||
err
|
err
|
||||||
|
@ -449,7 +451,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_payload_error(&mut self, err: PayloadError) {
|
fn set_payload_error(&mut self, err: PayloadError) {
|
||||||
if let Some(mut payload) = self.payload.take() {
|
if let Some(ref mut payload) = self.payload {
|
||||||
payload.1.set_error(err);
|
payload.1.set_error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue