mirror of
https://github.com/vlang/v.git
synced 2025-09-08 23:07:19 -04:00
vweb, x.vweb: update error checking for new error io.Eof (#20656)
This commit is contained in:
parent
a84bce37f1
commit
8714233f79
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user