Commit cfe0448
committed
EngineClient: remove stream on broken pipe
On write EPIPE, remove the stream from the engine at the point of
error. The select engine has no POLLERR equivalent, so the stream was
never removed and task.run() would not return. The poll and epoll
engines were not affected, as they remove the stream when POLLERR is
received, one loop iteration later; that path is kept as a fallback.
Drop writes to an unknown or closed stream, like set_write_eof()
already does, as the stream may now be removed while an event handler
is still running.
Add StreamEngineSelectTest to run StreamWorker tests under the select
engine.
Signed-off-by: Stephane Thiell <sthiell@stanford.edu>1 parent 381842e commit cfe0448Copy full SHA for cfe0448
2 files changed
+68-1Lines changed: 68 additions & 1 deletion
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib/ClusterShell/Worker
- tests
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/ClusterShell/Worker/EngineClient.py
Copy file name to clipboardExpand all lines: lib/ClusterShell/Worker/EngineClient.py+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
339 | 339 | |
340 | 340 | |
341 | 341 | |
| 342 | + |
| 343 | + |
| 344 | + |
342 | 345 | |
343 | 346 | |
344 | 347 | |
| ||
410 | 413 | |
411 | 414 | |
412 | 415 | |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
413 | 421 | |
414 | 422 | |
415 | 423 | |
|
Collapse file
+60-1Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
| 8 | + |
| 9 | + |
8 | 10 | |
9 | | - |
| 11 | + |
10 | 12 | |
11 | 13 | |
12 | 14 | |
| ||
369 | 371 | |
370 | 372 | |
371 | 373 | |
| 374 | + |
| 375 | + |
| 376 | + |
| 377 | + |
| 378 | + |
| 379 | + |
| 380 | + |
| 381 | + |
| 382 | + |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | + |
| 396 | + |
| 397 | + |
| 398 | + |
| 399 | + |
| 400 | + |
| 401 | + |
| 402 | + |
| 403 | + |
| 404 | + |
| 405 | + |
| 406 | + |
| 407 | + |
| 408 | + |
| 409 | + |
| 410 | + |
| 411 | + |
| 412 | + |
| 413 | + |
| 414 | + |
| 415 | + |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
0 commit comments