no more websocket ack messages, just use lower-level backpressure
This commit is contained in:
parent
1b38a2ee30
commit
2e29825a3d
5 changed files with 74 additions and 77 deletions
|
@ -211,10 +211,6 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for Uploader {
|
|||
}
|
||||
}
|
||||
|
||||
fn ack(ctx: &mut Context) {
|
||||
ctx.text("ack");
|
||||
}
|
||||
|
||||
impl Uploader {
|
||||
fn notify_error_and_cleanup(&mut self, e: Error, ctx: &mut Context) {
|
||||
error!("{}", e);
|
||||
|
@ -350,13 +346,10 @@ impl Uploader {
|
|||
}),
|
||||
);
|
||||
}
|
||||
ws::Message::Binary(data) | ws::Message::Continuation(Item::Last(data)) => {
|
||||
let result = self.handle_data(data)?;
|
||||
ack(ctx);
|
||||
return Ok(result);
|
||||
}
|
||||
ws::Message::Continuation(Item::FirstBinary(data))
|
||||
| ws::Message::Continuation(Item::Continue(data)) => {
|
||||
ws::Message::Binary(data)
|
||||
| ws::Message::Continuation(Item::FirstBinary(data))
|
||||
| ws::Message::Continuation(Item::Continue(data))
|
||||
| ws::Message::Continuation(Item::Last(data)) => {
|
||||
return self.handle_data(data);
|
||||
}
|
||||
ws::Message::Close(reason) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue