File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -496,9 +496,7 @@ impl<H: Handler> Connection<H> {
496
496
}
497
497
498
498
/// Process all packets available in the buffer, and returns
499
- /// whether at least one complete packet was read. `buffer` and
500
- /// `buffer2` are work spaces mostly used to compute keys. They
501
- /// are cleared before using, hence nothing is expected from them.
499
+ /// whether the connection should continue.
502
500
fn atomic_poll ( & mut self ) -> Poll < bool , HandlerError < H :: Error > > {
503
501
504
502
try_ready ! ( self . pending_poll( ) ) ;
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ impl Default for Config {
79
79
auth_banner : None ,
80
80
auth_rejection_time : std:: time:: Duration :: from_secs ( 1 ) ,
81
81
keys : Vec :: new ( ) ,
82
- window_size : 1 << 30 ,
83
- maximum_packet_size : 1 << 20 ,
82
+ window_size : 200000 ,
83
+ maximum_packet_size : 200000 ,
84
84
limits : Limits :: default ( ) ,
85
85
preferred : Default :: default ( ) ,
86
86
max_auth_attempts : 10 ,
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ impl Encrypted {
228
228
} ;
229
229
let buf_len = buf. len ( ) ;
230
230
231
- while buf. len ( ) > 0 && channel . recipient_window_size > 0 {
231
+ while buf. len ( ) > 0 {
232
232
// Compute the length we're allowed to send.
233
233
let off = std:: cmp:: min ( buf. len ( ) , channel. recipient_maximum_packet_size as usize ) ;
234
234
let off = std:: cmp:: min ( off, channel. recipient_window_size as usize ) ;
@@ -247,6 +247,7 @@ impl Encrypted {
247
247
channel. recipient_window_size -= off as u32 ;
248
248
buf = & buf[ off..]
249
249
}
250
+ debug ! ( "buf.len() = {:?}, buf_len = {:?}" , buf. len( ) , buf_len) ;
250
251
Ok ( buf_len)
251
252
} else {
252
253
Err ( Error :: WrongChannel )
You can’t perform that action at this time.
0 commit comments