Skip to content

Commit

Permalink
Don't crash the server in case a syntax error in QUERY mode
Browse files Browse the repository at this point in the history
  • Loading branch information
M. Mert Yildiran committed Oct 25, 2021
1 parent 8c4a97d commit cb418ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,10 @@ func streamRecords(conn net.Conn, data []byte) (err error) {

// Parse the query.
expr, err := Parse(query)
check(err)
if err != nil {
log.Printf("Syntax error: %v\n", err)
conn.Close()
}

// Do compile-time evaluations.
err = Precompute(expr)
Expand Down

0 comments on commit cb418ea

Please sign in to comment.