mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 02:17:05 +00:00
BACKENDS: NETWORKING: Properly handle request abortion
Finish the request with an error. Remove a useless check as handle is never called when state is not PROCESSING
This commit is contained in:
parent
93c98b92e9
commit
b23e06c4cd
@ -153,9 +153,7 @@ void SessionRequest::reuse(const Common::String &url, const Common::String &loca
|
||||
}
|
||||
|
||||
void SessionRequest::handle() {
|
||||
if (_state != PROCESSING) {
|
||||
return;
|
||||
}
|
||||
// This is called by ConnMan when state is PROCESSING
|
||||
|
||||
if (!_stream) _stream = makeStream();
|
||||
|
||||
@ -225,7 +223,8 @@ void SessionRequest::close() {
|
||||
}
|
||||
|
||||
void SessionRequest::abortRequest() {
|
||||
_state = FINISHED;
|
||||
ErrorResponse error(this, false, true, Common::String::format("Aborted"), -1);
|
||||
finishError(error);
|
||||
|
||||
if (_localFile) {
|
||||
_localFile->close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user