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:
parent
c692286c67
commit
a26bf261a9
|
@ -64,8 +64,7 @@ public:
|
||||||
return is.get();
|
return is.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
is.reset();
|
Close();
|
||||||
close_timer.Cancel();
|
|
||||||
|
|
||||||
is = open(new_uri, mutex);
|
is = open(new_uri, mutex);
|
||||||
uri = std::forward<U>(new_uri);
|
uri = std::forward<U>(new_uri);
|
||||||
|
|
Loading…
Reference in New Issue