lib/pigato/client.rb in pigato-0.1.7 vs lib/pigato/client.rb in pigato-0.1.8
- old
+ new
@@ -26,9 +26,10 @@
break if chunk == nil
res << Oj.load(chunk[4])
break if chunk[0] == Pigato::W_REPLY
end
+ return res[0] if res.length === 1
res
end
def _recv rid, timeout = @timeout
items = @poller.poll(timeout)