lib/pigato/client.rb in pigato-0.2.4 vs lib/pigato/client.rb in pigato-0.2.5

- old
+ new

@@ -34,11 +34,11 @@ break if chunk == nil res << Oj.load(chunk[4]) break if chunk[0] == Pigato::W_REPLY end - return nil if res.length == 1 - return res[0] if res.length == 0 + return nil if res.length == 0 + return res[0] if res.length == 1 res end def _recv rid, timeout = @timeout @socket.rcvtimeo = timeout;