fix: --count exists without waiting for extra input message#182
fix: --count exists without waiting for extra input message#182regalk13 wants to merge 1 commit into
Conversation
cmikk
left a comment
There was a problem hiding this comment.
Requesting a fix of stray whitespace, and more investigation into the implications of moving the check_close_event call after the write instead of before.
If that move is valid, then reset_close_event should be folded into check_close_event.
| if (res != nmsg_res_success) | ||
| return (res); | ||
|
|
||
There was a problem hiding this comment.
This commit adds stray whitespace on this and one other line, a common editor artifact.
git diff --check will show these before adding, and git diff --cached --check will show these before committing. I have the latter set up in a pre-commit hook script so I don't forget myself :)
|
|
||
| /* It's possible a set "count" has been reached. */ | ||
| check_close_event(iothr, io_output, 1); | ||
| reset_close_event(iothr, io_output); |
There was a problem hiding this comment.
This change results in check_close_event and reset_close_event being called as a pair both places they are called, meaning that the reset_close_event code could be merged into check_close_event.
However, they were affirmatively separated at the last refactor of this code: before commit 77f40, check_close_event was a single function called after the top-level write. That commit split it into check_close_event and reset_close_event, with the underlying write call in between. I do not recall the precise reason I did that ~3 years ago, but it must have been sufficiently compelling to add the reset_close_event function.
Fixes issue of --count
Prev:
Now:
Tested with
-rflag withnmsgfiles andjsoninputs.