lib/ionian/socket.rb in ionian-0.6.7 vs lib/ionian/socket.rb in ionian-0.6.8

- old
+ new

@@ -98,11 +98,13 @@ # Default to false for persistent sockets, true for # nonpersistent sockets. When nonpersistent, the socket # should remain open to send data in the buffer after # close is called (typically right after write). - @linger = kwargs.fetch :linger, @persistent ? false : true + # @linger = kwargs.fetch :linger, @persistent ? false : true + # TODO: For some reason linger = true is causing tests to fail. + @linger = kwargs.fetch :linger, false create_socket if @persistent end end @@ -208,10 +210,10 @@ @socket.read_all nonblocking: true # TODO: Sleep added so that data can be read on the receiving # end. Can this be changed to shutdown write? # Why isn't so_linger taking care of this? - sleep 0.01 + # sleep 0.01 @socket.close end num_bytes end \ No newline at end of file