mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
IDEChannel: Fix wait_until_not_busy() (#7084)
The time_elapsed variable would count until milliseconds_timeout + 1, so a != comparision won't work.
This commit is contained in:
parent
8693c925a0
commit
28a6a9a08f
Notes:
sideshowbarker
2024-07-18 18:13:59 +09:00
Author: https://github.com/ElectrodeYT Commit: https://github.com/SerenityOS/serenity/commit/28a6a9a08f5 Pull-request: https://github.com/SerenityOS/serenity/pull/7084
1 changed files with 2 additions and 2 deletions
|
@ -269,7 +269,7 @@ bool IDEChannel::wait_until_not_busy(bool slave, size_t milliseconds_timeout)
|
|||
IO::delay(1000);
|
||||
time_elapsed++;
|
||||
}
|
||||
return time_elapsed != milliseconds_timeout;
|
||||
return time_elapsed <= milliseconds_timeout;
|
||||
}
|
||||
|
||||
bool IDEChannel::wait_until_not_busy(size_t milliseconds_timeout)
|
||||
|
@ -279,7 +279,7 @@ bool IDEChannel::wait_until_not_busy(size_t milliseconds_timeout)
|
|||
IO::delay(1000);
|
||||
time_elapsed++;
|
||||
}
|
||||
return time_elapsed != milliseconds_timeout;
|
||||
return time_elapsed <= milliseconds_timeout;
|
||||
}
|
||||
|
||||
String IDEChannel::channel_type_string() const
|
||||
|
|
Loading…
Add table
Reference in a new issue