Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3fa2f1daabafbeaa4c33062a889028746d99daf
      
https://github.com/WebKit/WebKit/commit/d3fa2f1daabafbeaa4c33062a889028746d99daf
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M Source/WebKit/NetworkProcess/PreconnectTask.cpp

  Log Message:
  -----------
  PreconnectTask should cancel its NetworkLoad on timeout.
https://bugs.webkit.org/show_bug.cgi?id=309026
rdar://171339073

Reviewed by Per Arne Vollan.

When PreconnectTask times out, it fires the completion handler and destroys 
itself, but
does not cancel the underlying NetworkLoad. This leaves the NSURLSessionTask 
running,
which can result in wasted TLS handshakes and misleading SSL error logs (e.g., 
trust
evaluation failure / -1202) after the preconnect has already timed out.

The fix is to call m_networkLoad->cancel() in didTimeout() before invoking the 
completion
handler, so the underlying network task is immediately cancelled on timeout.

Manually verified with logs that the underlying network task is cancelled 
immediately
after PreconnectTask::didTimeout fires, with no confusing error logs.

* Source/WebKit/NetworkProcess/PreconnectTask.cpp:
(WebKit::PreconnectTask::didTimeout):

Canonical link: https://commits.webkit.org/308565@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to