igrigorik/em-http-request — Issue #157: Hangs when issuing parallel requests with duplicates
Author: gottlike
Created: 2011-11-26 11:50:10+00:00
State: open

I noticed that when you are using the Multi interface and there are 2 identical requests inside the queue, the script hangs indefinitely. However, I guess it happens because I used a string as index, instead of an iterator:

```ruby
urls.each do |url|
http = EventMachine::HttpRequest.new(@server+url[1], @connect_opts)
req = http.get(@request_opts)
multi.add url[0], req
end
```
Nonetheless, it'd be great if the script would at least throw an error or something and didn't hang.