vweb, x.vweb: update error checking for new error io.Eof (#20656)

This commit is contained in:
Casper Küthe 2024-01-26 01:47:25 +01:00 committed by GitHub
parent a84bce37f1
commit 8714233f79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -690,7 +690,7 @@ fn handle_conn[T](mut conn net.TcpConn, global_app &T, controllers []&Controller
// Request parse
req := http.parse_request(mut reader) or {
// Prevents errors from being thrown when BufferedReader is empty
if '${err}' != 'none' {
if err !is io.Eof {
eprintln('[vweb] tid: ${tid:03d}, error parsing request: ${err}')
}
return

View File

@ -487,7 +487,7 @@ fn handle_read[A, X](mut pv picoev.Picoev, mut params RequestParams, fd int) {
// request header first
req = http.parse_request_head(mut reader) or {
// Prevents errors from being thrown when BufferedReader is empty
if err.msg() != 'none' {
if err !is io.Eof {
eprintln('[vweb] error parsing request: ${err}')
}
pv.close_conn(fd)