[JDEV] XML::Stream - Can't call method "flush" on an undefined value

DJ Adams dj.adams at pobox.com
Wed Oct 10 09:11:39 CDT 2001

On Wed, Oct 10, 2001 at 06:39:06PM +0800, Miguel A.L. Paraz wrote:
> Hi,
> I hope this is the right place for Net::Jabber and XML::Stream questions.
> I'm changing the examples to make some "bots" for testing Jabber load.
> I wrote a script to log into Jabber 10 times using random accounts that
> were pre-registered.  It consistently fails on the 3rd login with:
> Can't call method "flush" on an undefined value at /usr/lib/perl5/site_perl/5.6.0/XML/Stream.pm line 1260.

Random guess: flush is a method called on a socket. If a connection
attempt is being refused by the Jabber server due to rating or karma,
which might be the case here ("consistently fails on the 3rd login"),
then that socket might not actually exist in Perl space, hence the
undefined value. 

To test out this theory, stick some sleep statements in there, also
check the error.log from the Jabber server for indications of 
socket limiting etc.

What version of XML::Stream are you using? There's a flush call on
line 1258 in 1.12 of XML/Stream.pm ...


More information about the JDev mailing list