MS SOAP Exception, Bizzare IE behavior

Note the example code for an MS SOAP client run in a thread:

void ThreadFunction(void){
CoInitialize(NULL);

ISoapSerializerPtr Serializer;
ISoapReaderPtr Reader;
ISoapConnectorPtr Connector;

try{
// Connect to the service
Connector.CreateInstance(__uuidof(HttpConnector));
Connector->Property["EndPointURL"] =
"http://www.allesta.net:51110/webservices/soapx4/isuseronline.php";
Connector->Connect();

// Begin message
Connector->Property["SoapAction"] = "uri:allesta-YahooUserPing";
Connector->BeginMessage();

// Create the SoapSerializer
Serializer.CreateInstance(__uuidof(SoapSerializer));

// Connect the serializer to the input stream of the connector
Serializer->Init(_variant_t((IUnknown*)Connector->InputStream));

// Build the SOAP Message
Serializer->startEnvelope("","","");
Serializer->startBody("");
Serializer->startElement("isuseronline",
"uri:allesta-YahooUserPing",
"",
"m");
Serializer->startElement("username","","","");
Serializer->writeString("laghari78");
Serializer->endElement();
Serializer->endElement();
Serializer->endBody();
Serializer->endEnvelope();

// Send the message to the web service
Connector->EndMessage();

// Read the response
Reader.CreateInstance(__uuidof(SoapReader));

// Connect the reader to the output stream of the connector
Reader->Load(_variant_t((IUnknown*)Connector->OutputStream),
"");

}
catch(...){
//error
}

CoUninitialize();
}

I have built this into a toolbar for Internet Explorer, the code is called in a seperate thread. Something very strange is happening. When the web service is up and the code runs through, then everything is fine. However when the web service is down then an exception is thrown from Connector->EndMessage();, this is caught by the catch(...) statement. Following this exception happening Internet Explorer behaves very starangely, if you visit a site which has any concept of sessions, the sessions drop out intermittantly. For example when you visit a site you need to log in to, you get logged out randomly after a few navigations, usually less that 10. This is something to do with cookies I think, as some sites start telling you cookies are not enabled on you machine, which they are.

This behaviour never happens when the SOAP client runs through OK.
[2791 byte] By [NikL] at [2007-11-20 9:43:35]