lib/nfs/FileReader: clean up on disconnect

Avoids crash because Close() invokes a call on a destructed
NfsConnection.
This commit is contained in:
Max Kellermann 2014-11-25 12:29:55 +01:00
parent 016063c810
commit e72eef421b

View File

@ -186,7 +186,7 @@ NfsFileReader::OnNfsConnectionDisconnected(const Error &error)
{
assert(state > State::MOUNT);
state = State::INITIAL;
CancelOrClose();
Error copy;
copy.Set(error);