From 38f19981b2bcaa6f08f1d1e81be66d217e8da9b8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 25 Nov 2014 13:50:36 +0100 Subject: [PATCH] lib/nfs/FileReader: reset state in OnNfsConnectionFailed() Avoid calling NfsConnection::RemoveLease(), because the lease has been removed already. --- src/lib/nfs/FileReader.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/nfs/FileReader.cxx b/src/lib/nfs/FileReader.cxx index 7f5506d50..79256492b 100644 --- a/src/lib/nfs/FileReader.cxx +++ b/src/lib/nfs/FileReader.cxx @@ -164,6 +164,8 @@ NfsFileReader::OnNfsConnectionFailed(const Error &error) { assert(state == State::MOUNT); + state = State::INITIAL; + Error copy; copy.Set(error); OnNfsFileError(std::move(copy));