phergie / phergie-irc-client-react

IRC client library built on React
BSD 3-Clause "New" or "Revised" License
56 stars 26 forks source link

Connecting to irc.rizon.sexy sometimes results in a registration timeout #26

Closed hashworks closed 9 years ago

hashworks commented 9 years ago

This happens 1/10 times when you connect to the irc.rizon.sexy server:

2015-02-07 19:38:12 DEBUG testnick!testident@irc.rizon.sexy USER testident 0 * :testrn []
2015-02-07 19:38:12 DEBUG testnick!testident@irc.rizon.sexy NICK :testnick []
2015-02-07 19:38:12 DEBUG testnick!testident@irc.rizon.sexy :irc.rizon.sexy NOTICE AUTH :*** Found your hostname (cached) []
2015-02-07 19:38:12 DEBUG testnick!testident@irc.rizon.sexy :irc.rizon.sexy NOTICE AUTH :*** Checking Ident []
2015-02-07 19:38:14 DEBUG testnick!testident@irc.rizon.sexy :irc.rizon.sexy NOTICE AUTH :*** No Ident response []
2015-02-07 19:38:49 DEBUG testnick!testident@irc.rizon.sexy PING :2937740994 []
2015-02-07 19:38:49 DEBUG testnick!testident@irc.rizon.sexy PONG :2937740994 []
2015-02-07 19:38:49 DEBUG testnick!testident@irc.rizon.sexy ERROR :Closing Link: mnch-5d86ba90.pool.mediaWays.net (Registration timed out) []

As you see the PING arrives when the server closes the connection - way too late.

I had the same problem with this server before when developing on my own IRC bots - however my mistake was that I used \n\r instead of \r\n, according to the parser this doesn't seem to be the issue. In my case the PING message rested in the buffer until the ERROR arrvied.

I'm not sure if this is a parsing problem, so I'm posting this here.

elazar commented 9 years ago

Offhand, I'm not seeing any obvious indicator that this is a parsing issue. One thing you can do to investigate that possibility is to add a debug prompt somewhere in the parse() method defined in vendor/phergie/phergie-irc-parser/src/Parser.php, either for the $message parameter and $parsed variables used toward the top or the $parsed['tail'] array element referenced toward the bottom.

If it's not happening consistently, I'm tempted to think the issue is with some inconsistent behavior of the server. A quick Google search indicates that the problem may be related to SSL. Issues with Ident or port forwarding, as well as general sporadic network connectivity issues, are other possibilities. It's hard to say without more information on the problem. Can you provide your composer.json and Phergie config files?

elazar commented 9 years ago

@hashworks Any developments on this issue, or can I close it?

hashworks commented 9 years ago

I'm not finding time atm, I'll reopen it as soon as I get to it.