Avoid a deadlock when an error is encountered in the write worker.