Commit f2020ed
committed
Add flow control in AsyncSSH redirection to StreamWriter objects
This commit adds support for flow control when an asyncio.StreamWriter is
passed to AsyncSSH's process redirect feature. Previously, writes were
allowed indefinitely, potentially building up a large buffer in memory if
data was being sent faster than it was being consumed. Thanks go to Benjy
Wiener for reporting this issue and supplying a test script to reproduce it.1 parent c3dc869 commit f2020ed
2 files changed
+56
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
| 575 | + | |
575 | 576 | | |
576 | 577 | | |
577 | 578 | | |
| 579 | + | |
578 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
579 | 602 | | |
580 | 603 | | |
581 | 604 | | |
582 | 605 | | |
583 | | - | |
| 606 | + | |
584 | 607 | | |
585 | 608 | | |
586 | 609 | | |
587 | 610 | | |
588 | | - | |
| 611 | + | |
589 | 612 | | |
590 | 613 | | |
591 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
592 | 620 | | |
593 | 621 | | |
594 | 622 | | |
| |||
925 | 953 | | |
926 | 954 | | |
927 | 955 | | |
928 | | - | |
| 956 | + | |
| 957 | + | |
929 | 958 | | |
930 | 959 | | |
931 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
964 | 986 | | |
965 | 987 | | |
966 | 988 | | |
| |||
0 commit comments