PDA

View Full Version : QNetworkAccessManager::post() never returns



danc81
20th October 2009, 22:30
I have a problem with QNetworkAccessManager that after a network failure (plug pulled out for example), any requests made after the connection is restored result in a WSAEISCONN error from the QNativeSocketEngine layer and they never fire send the request or fire the finished() signal.

Should the QNetworkAccessManager be deleted and recreated after the failure? I would think that after a WSAECONNRESET error that the connection would be dead and so reconnection would not be a problem but that doesn't seem to be the case here.

squidge
20th October 2009, 23:29
WebKit uses QNetworkAccessManager, have you checked to see how that handles it?

danc81
21st October 2009, 10:13
I didn't know that, I'll check it out. I have created a test app to try to reproduce the problem and I can't so something in my code is causing it but I've stripped it right back so the only real difference between the test app and the real app is the actual data being sent and the URL (same domain, different script) and it still has the problem, this will be an interesting one.