lib/wifly/connection.rb in wifly-0.0.3 vs lib/wifly/connection.rb in wifly-0.0.4

- old
+ new

@@ -24,9 +24,12 @@ def send_command(str, return_len=0) str += "\r" socket.write(str) expected_return_length = str.length + "\r\n#{prompt}".length + return_len socket.read(expected_return_length).gsub(prompt,'') + rescue Errno::EPIPE # connection closed on the client end + initialize_socket + retry end def close socket.close end \ No newline at end of file