Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/474384359 https://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).
- Loading branch information