break loop if socket is closed

bug/bundler_fix
rwhitcroft 2015-04-21 11:09:17 -04:00
parent 602e9c8df1
commit 70f94bbd96
1 changed files with 1 additions and 2 deletions

View File

@ -579,6 +579,7 @@ class Client
rv = nil
while (
not conn.closed? and
rv != Packet::ParseCode::Completed and
rv != Packet::ParseCode::Error
)
@ -586,8 +587,6 @@ class Client
begin
buff = conn.get_once(-1, 1)
return resp if buff.to_s.length == 0
rv = resp.parse( buff || '' )
# Handle unexpected disconnects