[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: stream closed (IOError

Yukihiro Matsumoto

10/5/2008 8:45:00 PM

Hi,

In message "Re: stream closed (IOError)"
on Mon, 6 Oct 2008 04:56:21 +0900, "Eric Will" <rakaur@malkier.net> writes:

|On Sun, Oct 5, 2008 at 12:33 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
|> * you don't need timeout.rb. try attached simpler version.
|
|While simpler version, this causes the same error...

Hmm, let's step forward one by one. You have two timers, which one is
causing the problem? What if wrapping timer callbacks with begin and
rescue?

matz.

2 Answers

Eric Will

10/5/2008 9:09:00 PM

0

On Sun, Oct 5, 2008 at 4:44 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> Hmm, let's step forward one by one. You have two timers, which one is
> causing the problem? What if wrapping timer callbacks with begin and
> rescue?

I've tried wrapping the start method in timer.rb, wrapping the Timer
callbacks outside of "Timer.new" and inside of "Timer.new" (ie, part
of the callback), and none of these rescue it. When I wrap the call to
ioloop (which is the ENTIRE program, basically) it catches it... which
doesn't really narrow it down much.

I'm trying as I'm writing this, so bare with me for a moment...
wrapping c.read in lib/xmppd.rb catches it... wrapping parse in
Stream#read with it does NOT catch it. So it's somewhere between
Stream#read's call to Stream#parse.

> matz.

I'll keep playing with this, but I don't know that I'm getting very
far... I still think it has something to do with threads.

-- Eric Will

Eric Will

10/5/2008 9:19:00 PM

0

On Sun, Oct 5, 2008 at 5:08 PM, Eric Will <rakaur@malkier.net> wrote:

> I'll keep playing with this, but I don't know that I'm getting very
> far... I still think it has something to do with threads.

Yeah, that's as far as I can get. Wrapping different parts of
Stream#read doesn't catch it.

This seems impossible unless it's something to do with threads, which
I know next to nothing about. :)

I was going to try with ruby1.9, but the IDN gem doesn't work.

-- Eric Will