test/support/redis_mock.rb
# Bail out of @server.accept before closing the socket. This is required
# to avoid EADDRINUSE after a couple of iterations.
Bail out of @server.accept before closing the socket. This is required
to avoid EADDRINUSE after a couple of iterations.
Bail out of @server . accept before closing the socket . This is required to avoid EADDRINUSE after a couple of iterations .
def shutdown
      @thread.terminate if @thread
      @server.close if @server
    rescue => ex
      $stderr.puts "Error closing mock server: #{ex.message}" if VERBOSE
      $stderr.puts ex.backtrace if VERBOSE
    end
def shutdown @thread . terminate if @thread @server . close if @server rescue => ex $stderr . puts "Error closing mock server: #{ex.message}" if VERBOSE $stderr . puts ex . backtrace if VERBOSE end
Bail out of @server.accept before closing the socket.
Bail out of @server . accept before closing the socket .