Commit fc60c97
committed
ssl: delay closing TCP sockets in start_server
Some tests expect server-side SSLSocket#accept to fail for various
reasons. On some systems, closing the underlying socket immediately
with IO#close causes the TCP connection to be terminated with RST.
Do not close it immediately so that the client can reliably receive
the TLS alert. This allows writing more meaningful assertions.
Also add a dedicated test case for the rb_sys_fail() path in
SSLSocket#connect.1 parent b67520f commit fc60c97
2 files changed
Lines changed: 29 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
| 495 | + | |
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| |||
547 | 548 | | |
548 | 549 | | |
549 | 550 | | |
550 | | - | |
| 551 | + | |
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
| |||
1286 | 1287 | | |
1287 | 1288 | | |
1288 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1289 | 1311 | | |
1290 | 1312 | | |
1291 | 1313 | | |
| |||
1338 | 1360 | | |
1339 | 1361 | | |
1340 | 1362 | | |
1341 | | - | |
| 1363 | + | |
1342 | 1364 | | |
1343 | 1365 | | |
1344 | 1366 | | |
| |||
2106 | 2128 | | |
2107 | 2129 | | |
2108 | 2130 | | |
2109 | | - | |
| 2131 | + | |
2110 | 2132 | | |
2111 | 2133 | | |
2112 | 2134 | | |
| |||
2458 | 2480 | | |
2459 | 2481 | | |
2460 | 2482 | | |
2461 | | - | |
2462 | | - | |
2463 | | - | |
2464 | | - | |
2465 | | - | |
2466 | | - | |
2467 | | - | |
2468 | | - | |
2469 | 2483 | | |
2470 | 2484 | | |
2471 | 2485 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
0 commit comments