You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #6515 - ehuss:fix-fix-diag-race, r=alexcrichton
Fix a very minor race condition in `cargo fix`.
There is a very rare race where a "fix" message was getting posted *after* `Message::Finish`, and thus being dropped without being printed. This is caused by the diagnostic server disconnecting the client before posting `Message::FixDiagnostic`. The solution is to keep the client on the line until after the message is posted.
Fixes some errors in `fixes_missing_ampersand` seen in CI:
https://travis-ci.org/rust-lang/cargo/jobs/474384359https://travis-ci.org/rust-lang/cargo/jobs/429809800
I also moved the `done` check to the beginning of the loop because every time the server was shut down it was needlessly trying to parse an empty string (and failing).
0 commit comments