redis.tcl: return I/O error message when peer closes connection.

This commit is contained in:
antirez 2014-05-14 00:14:35 +02:00
parent 832a298005
commit bae30479fb

View File

@ -170,7 +170,10 @@ proc ::redis::redis_read_reply fd {
- {return -code error [redis_read_line $fd]}
$ {redis_bulk_read $fd}
* {redis_multi_bulk_read $fd}
default {return -code error "Bad protocol, '$type' as reply type byte"}
default {
if {$type eq {}} {return -code error "I/O error reading reply"}
return -code error "Bad protocol, '$type' as reply type byte"
}
}
}