lib/karma/connection.rb in karma-0.1.3 vs lib/karma/connection.rb in karma-0.1.4

- old
+ new

@@ -6,11 +6,11 @@ def send_and_read(request) unless defined?(@socket) establish_connection! end - send(request) + push(request) read end private @@ -21,11 +21,11 @@ establish_connection! retry end end - def send(message) + def push(message) message = message.to_json connect do |conn| conn.send("#{message}\r\n", 0) conn.flush end @@ -46,11 +46,10 @@ end def establish_connection! @socket = TCPSocket.new( Karma.configuration.host, - Karma.configuration.port, - connect_timeout: 0.5 + Karma.configuration.port ) end end end \ No newline at end of file