Skip to content

Commit e6b9be5

Browse files
Merge pull request #1072 from lightpanda-io/assert_corretly_set_exit_when_done
Ensure extra_socket can't happen when exit_when_done == true
2 parents 6f7c875 + 853b7f8 commit e6b9be5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/browser/page.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,12 @@ pub const Page = struct {
312312
// mode with an extra socket. Either way, we're waiting
313313
// for http traffic
314314
if (try http_client.tick(ms_remaining) == .extra_socket) {
315+
// exit_when_done is explicitly set when there isn't
316+
// an extra socket, so it should not be possibl to
317+
// get an extra_socket message when exit_when_done
318+
// is true.
319+
std.debug.assert(exit_when_done == false);
320+
315321
// data on a socket we aren't handling, return to caller
316322
return .extra_socket;
317323
}

0 commit comments

Comments
 (0)