nil check

This commit is contained in:
Josh Baker 2016-07-29 11:22:13 -07:00
parent 671374e8fd
commit 9d5301c35f
1 changed files with 3 additions and 1 deletions

View File

@ -82,8 +82,10 @@ func ListenAndServe(
return err
}
if len(cmds) > 0 {
if handler != nil {
handler(wrc, cmds)
}
}
if wr.err != nil {
if wr.err == errClosed {
return nil