[Backgroundrb-devel] Fwd: Method hangs for the first time if called synchronously

Jonathan Wallace jonathan.wallace at gmail.com
Wed Jul 16 14:35:50 EDT 2008


It didn't fix it for me.
 Jonathan

On Wed, Jul 16, 2008 at 2:23 PM, hemant <gethemant at gmail.com> wrote:
> On Wed, Jul 16, 2008 at 2:11 AM, Csongor Gyuricza <csgyuricza at gmail.com> wrote:
>> I forgot to mention that this is on a Mac.
>> Unfortunately I don't have a linux box easily available, I'd have to setup
>> one. I won't be able to do it today, I can do it in a couple of days unless
>> someone else does it before.
>
> Can you try following fix in packet and report if this fixes your issue:
>
> --- a/lib/packet/packet_nbio.rb
> +++ b/lib/packet/packet_nbio.rb
> @@ -13,8 +13,8 @@ module Packet
>    def read_data(t_sock)
>      sock_data = []
>      begin
> -        while(t_data = t_sock.read_nonblock((16*1024)-1))
> -          #raise DisconnectError.new(t_sock,sock_data.join) if t_data.empty?
> +        while(t_data = t_sock.recv_nonblock((16*1024)-1))
> +          raise DisconnectError.new(t_sock,sock_data.join) if t_data.empty?
>          sock_data << t_data
>        end
>      rescue Errno::EAGAIN
>
> Unfortunately, I don't have Mac OSX, for testing and hence the problem.
>
>
> Thanks for your patience.
>
>
>
> --
> Let them talk of their oriental summer climes of everlasting
> conservatories; give me the privilege of making my own summer with my
> own coals.
>
> http://gnufied.org
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>


More information about the Backgroundrb-devel mailing list