mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-07 15:14:20 +08:00
fixed #139 - handle incorrect terminal modes list length
This commit is contained in:
parent
eb3c13d62b
commit
7b0bdbcce8
1 changed files with 5 additions and 1 deletions
|
@ -88,7 +88,11 @@ impl russh::server::Handler for ServerHandler {
|
|||
session: Session,
|
||||
) -> Self::FutureUnit {
|
||||
let term = term.to_string();
|
||||
let modes = modes.to_vec();
|
||||
let modes = modes
|
||||
.into_iter()
|
||||
.take_while(|x| (x.0 as u8) > 0 && (x.0 as u8) < 160)
|
||||
.map(Clone::clone)
|
||||
.collect();
|
||||
async move {
|
||||
{
|
||||
let mut this_session = self.session.lock().await;
|
||||
|
|
Loading…
Add table
Reference in a new issue