1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: fix the none error for empty TCP connections (#9759)

This commit is contained in:
William Clavier 2021-04-16 01:45:46 -04:00 committed by GitHub
parent 60bc280ad0
commit b11b744630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,7 +321,10 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
} }
page_gen_start := time.ticks() page_gen_start := time.ticks()
req := parse_request(mut reader) or { req := parse_request(mut reader) or {
// Prevents errors from being thrown when BufferedReader is empty
if '$err' != 'none' {
eprintln('error parsing request: $err') eprintln('error parsing request: $err')
}
return return
} }
app.Context = Context{ app.Context = Context{