Skip Menu |

This queue is for tickets about the AnyEvent-Digg-Stream CPAN distribution.

Report information
The Basics
Id: 70208
Status: resolved
Priority: 0/
Queue: AnyEvent-Digg-Stream

People
Owner: Nobody in particular
Requestors: JEB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: (no value)



Hello, I am using AnyEvent::Digg::Stream version 0.3, and find that after some period, the stream stops recieving events. I confirmed with tcpdump that no more packets are being transferred between my host and services.digg.com. I am only processing on diggs and comments: my $cli = AnyEvent::Digg::Stream->new( events => [qw ( digg comment )], on_digg => $process, on_comment => $process ); my $ready = AnyEvent->condvar; $ready->recv; Where $process is a closure to deal with a recieved message (it extracts a link and puts it in a message queue). I don't know if it is Digg not sending any more events, or requesting the library disconnects, but as a user of the library, I just see the my script block (presumably on recv()). It seems to happen after a "while" - at least 15 minutes - but sometimes as long as after an hour or two. It would be fine is the libary exited in this case - as I find reconnecting starts the stream of data again. Are you aware of any API changes or maximum connected time for the digg stream? This is on Perl v5.10.1. Many thanks, James
On Thu Aug 11 03:37:53 2011, JEB wrote: Show quoted text
> Hello, > > I am using AnyEvent::Digg::Stream version 0.3, and find that after some > period, the stream stops recieving events. I confirmed with tcpdump that > no more packets are being transferred between my host and > services.digg.com. I am only processing on diggs and comments: > > my $cli = AnyEvent::Digg::Stream->new( > events => [qw ( digg comment )], > on_digg => $process, > on_comment => $process > ); > my $ready = AnyEvent->condvar; > $ready->recv; > > Where $process is a closure to deal with a recieved message (it extracts > a link and puts it in a message queue). > > I don't know if it is Digg not sending any more events, or requesting > the library disconnects, but as a user of the library, I just see the my > script block (presumably on recv()). It seems to happen after a "while" > - at least 15 minutes - but sometimes as long as after an hour or two. > It would be fine is the libary exited in this case - as I find > reconnecting starts the stream of data again. > > Are you aware of any API changes or maximum connected time for the digg > stream? > > This is on Perl v5.10.1.
This happens when the tcp connection is closed. I was able to verify using `tcpkill -i $INTERFACE host services.digg.com`. I just pushed 0.04 which includes an on_disconnect handler, which you can use to either quit the main loop or create a new connection.