mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Merge pull request #1072 from lightpanda-io/assert_corretly_set_exit_when_done
Ensure extra_socket can't happen when exit_when_done == true
This commit is contained in:
@@ -312,6 +312,12 @@ pub const Page = struct {
|
|||||||
// mode with an extra socket. Either way, we're waiting
|
// mode with an extra socket. Either way, we're waiting
|
||||||
// for http traffic
|
// for http traffic
|
||||||
if (try http_client.tick(ms_remaining) == .extra_socket) {
|
if (try http_client.tick(ms_remaining) == .extra_socket) {
|
||||||
|
// exit_when_done is explicitly set when there isn't
|
||||||
|
// an extra socket, so it should not be possibl to
|
||||||
|
// get an extra_socket message when exit_when_done
|
||||||
|
// is true.
|
||||||
|
std.debug.assert(exit_when_done == false);
|
||||||
|
|
||||||
// data on a socket we aren't handling, return to caller
|
// data on a socket we aren't handling, return to caller
|
||||||
return .extra_socket;
|
return .extra_socket;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user