mohamedsaeed27 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

Doesn't auto reconnect #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i found an early version of your library and played with the cli example and 
was working great.
Sending quit would kill the script as expected and break would restart it.

I've since upgraded the library to the latest available and break seems to just 
kill the script as 
well.
I've searched through the source code and cant see any major change that should 
affect this.

Is break meant to kill the connection? If not, what might be causing this 
issue. I'm using the 
exact same server details as the previous version of the library.

Cheers,

Ben

Original issue reported on code.google.com by avenja...@gmail.com on 17 Jul 2008 at 11:28

GoogleCodeExporter commented 8 years ago
I forgot to mention that I've set to log level to LEVEL_VERBOSE and I dont go 
any futher msgs output.
The last line I see is:

[VERBOSE]: SENT: <message from='user@domain.com/xmpphp93D9A88C' 
to='otheruser@domain.com/Comp07DA5D69' type='chat'><body>Thanks for sending me 
"break".</body></message>

Original comment by avenja...@gmail.com on 17 Jul 2008 at 11:32

GoogleCodeExporter commented 8 years ago
Ok - send is not even logging the </end> message being sent. Something else 
weird.

Original comment by avenja...@gmail.com on 17 Jul 2008 at 11:38

GoogleCodeExporter commented 8 years ago
In case this helps:

PHP 5.2.5 (cli) (built: Mar  4 2008 22:57:15) 

Original comment by avenja...@gmail.com on 17 Jul 2008 at 12:03

GoogleCodeExporter commented 8 years ago
It appears this bug has been introduced somewhere after revision 28 and before 
or in revision 30.

Original comment by avenja...@gmail.com on 17 Jul 2008 at 12:35

GoogleCodeExporter commented 8 years ago
YAYAYAYA!!!! ok so I worked out what had changed.

In XMLStream.php

public function send($msg)

became:

protected function send($msg)

This was causing the script to die for some odd reason.

Original comment by avenja...@gmail.com on 17 Jul 2008 at 1:17

GoogleCodeExporter commented 8 years ago
Comment 5 was to fix revision 30. To fix the latest one I had to make all the 
funtions in XMLStream public, 
and adjusted this in the doReconnect() function:

            $this->log->log("Reconnecting...",  XMPPHP_Log::LEVEL_WARNING);
            $this->connect(false, false);

to:

            $this->log->log("Reconnecting...",  XMPPHP_Log::LEVEL_WARNING);
            $this->connect(30,false, false);

Original comment by avenja...@gmail.com on 17 Jul 2008 at 1:30

GoogleCodeExporter commented 8 years ago
Thanks very much for this fix!  It'll be in the next release, and SVN shortly.

Original comment by nathanfr...@gmail.com on 18 Jul 2008 at 5:48