Skip to content

Commit

Permalink
vweb, x.vweb: update error checking for new error io.Eof (#20656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper64 committed Jan 26, 2024
1 parent a84bce3 commit 8714233
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vlib/vweb/vweb.v
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vlib/x/vweb/vweb.v
Expand Up @@ -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)
Expand Down

0 comments on commit 8714233

Please sign in to comment.