Skip to content

Commit

Permalink
Tell client it send us garbage instead of exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
netmute committed Dec 4, 2024
1 parent 8321b49 commit 23669f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ func main() {
for {
req, err := readMessage(reader)
if err != nil {
log.Fatalf("Error reading message: %v", err)
sendError(nil, -32600, "Malformed request", err.Error())
continue // Ignore malformed request
}

// Handle request in a separate goroutine
Expand Down

0 comments on commit 23669f2

Please sign in to comment.