diff --git a/redcon.go b/redcon.go index 18187ad..2809dc7 100644 --- a/redcon.go +++ b/redcon.go @@ -82,7 +82,9 @@ func ListenAndServe( return err } if len(cmds) > 0 { - handler(wrc, cmds) + if handler != nil { + handler(wrc, cmds) + } } if wr.err != nil { if wr.err == errClosed {