chuckremes/ffi-rzmq — Issue #47: sock.recv_string returning empty strings
Author: ArtemTitoulenko
Created: 2011-11-20 01:22:38+00:00
State: open

I've been trying to use `sock.recv_string` inside of a class that handles all of the zmq connections and message parsing. When a lot of connections stream in, `sock.recv_string` returns nil or empty strings in quick succession. It basically locks up everything and will not accept any more messages. The following code will accept about 19-25 connections then just get stuck in a loop, printing `@conn.receive` then `@conn.reply_http` over and over again.

```ruby
lood do
puts "@conn.receive"
msg = ""
@conn.request_sock.recv_string msg
puts "@conn.reply_http"
@conn.reply_http(msg, "hello world")
end
```