Commit 113de2b
fix(grpc): drain log stream gracefully on success path in solve_lp/mip
stop_log_streaming() calls TryCancel() which races against the server's
final log drain: poll_for_completion() returns as soon as the job is
marked complete, then TryCancel() kills the stream before the server has
finished sending remaining lines (e.g. "Best objective …").
Add drain_log_streaming(): polls log_stream_done_ (set when the thread
exits naturally after receiving the job_complete sentinel) for up to 5s,
then falls back to stop_log_streaming(). Use it on the success path in
solve_lp and solve_mip so all final log lines are received before the
stream is torn down.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>1 parent 02feec8 commit 113de2b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
0 commit comments