When connecting to talk.google.com with SSL, server very often does not reply to XML stream initiation. This seems limited to Firefox 3. However, if first connection is closed and another one is opened, server replies to XML stream initiation on the second one.
The correct solution is to implement a stream-timeout state in the TCP connector which triggers a disconnection and then a retry. Unfortunately there are many places where the socket transport calls back to the connector, so it may happen with other servers that a stream reply does come back in after connector has entered stream-timeout, and events from the old socket will get mixed with events from the new one, leading to very bad effects (https://answers.launchpad.net/sameplace/+question/36923). So current (ugly) solution will be to just have the connector check what server it is connecting to, and perform a "ghost" connection first if it's talk.google.com.
Sorry, but I'm not understanding your "fix". What do I need to do, in order for this to function.