summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mpdlib.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/mpdlib.rb b/mpdlib.rb
index b452e9e..b8e9818 100644
--- a/mpdlib.rb
+++ b/mpdlib.rb
@@ -30,11 +30,14 @@ class MPD
while true
line = @socket.gets
- return response if line == "OK\n"
+ break if line == "OK\n"
return false if line =~ /^ACK/
response << line
end
+
+ return true if response.empty?
+ return response
end
def generate_hash str