input/last: call Close() in Open()

Prevents a possible bug which occurs when the caller-provided open()
function throws; then the "uri" field is never set.
This commit is contained in:
Max Kellermann 2021-05-27 14:03:46 +02:00
parent c692286c67
commit a26bf261a9
1 changed files with 1 additions and 2 deletions

View File

@ -64,8 +64,7 @@ public:
return is.get();
}
is.reset();
close_timer.Cancel();
Close();
is = open(new_uri, mutex);
uri = std::forward<U>(new_uri);