Skip to content

Instantly share code, notes, and snippets.

@prosm
prosm / benchmark.rb
Created May 3, 2011 12:34
Proof of concept showing memory leak in em-websocket
require 'rubygems'
require 'eventmachine'
require 'open-uri'
require 'em-http-request'
def connect_to_ws
http = EventMachine::HttpRequest.new("ws://127.0.0.1:8081/websocket").get :timeout => 0
http.errback { |msg|
puts msg
}