Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean warnings, always disconnect on capacity errors
  • Loading branch information
maciejhirsz committed Sep 17, 2020
commit 56acd9d9f4f55878c05ab208c22211e6324c695c
5 changes: 2 additions & 3 deletions src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::borrow::Borrow;
use std::collections::VecDeque;
use std::io::{Cursor, Read, Seek, SeekFrom, Write};
use std::io::{Cursor, Read, Write};
use std::mem::replace;
use std::net::SocketAddr;
use std::str::from_utf8;
Expand Down Expand Up @@ -427,8 +427,8 @@ where
self.handler.on_error(err);
if let Err(err) = self.send_close(CloseCode::Size, reason) {
self.handler.on_error(err);
self.disconnect()
}
self.disconnect()
}
Kind::Protocol => {
if self.settings.panic_on_protocol {
Expand Down Expand Up @@ -1176,7 +1176,6 @@ where

trace!("Buffering frame to {}:\n{}", self.peer_addr(), frame);

let pos = self.out_buffer.position();
frame.format(self.out_buffer.get_mut())?;
Ok(())
}
Expand Down