Commit 13f2c00
committed
fix: Improve disconnect logic for ssh-bin
Previously we were only closing stdin, and normally that's enough, but
not always: if the connection is gone, but ssh doesn't know about it
(e.g. if the OS was suspended for long enough time, and then resumed),
then the connection kept hanging.
This commit provides custom context for the external ssh command, and
cancels it when we need to disconnect.1 parent 5c6a91d commit 13f2c00
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| 182 | + | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| |||
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| 222 | + | |
| 223 | + | |
216 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
217 | 230 | | |
0 commit comments