I have tried to reconnect on disconnected() signal...and...same story.
Without proxy everything works fine.![]()
I have tried to reconnect on disconnected() signal...and...same story.
Without proxy everything works fine.![]()
Also i have tried to pause mine app ( from 10 to 60 sec) after disconnecting.
Connection stream looks just fine:
calling disconnectFromHost() function and than sleep for n secs.
Application(A): [FIN,ACK]
Server(S): [FIN,ACK]
A: [ACK]
..pause..
new connection
A : [SYN]
S : [SYN, ACK]
A : [ACK] {http connection }
S : [ACK] {connection established}
A : [ACK]
A : [FIN, ACK] { why??? error occurs only with proxy}
S : [FIN, ACK]
A : [ACK]
Maybe the proxy is somehow broken.
Well. Nope![]()
How do you know that? It is the proxy that terminates the connection, right? Have you checked it using a network sniffer? Does a packet containing FIN+ACK actually originate from the proxy?
Yes FIN,ACK sending to proxy IP and going from proxy IP, connection binded to the newly assigned port.
But first fin packet sends my app.
Do the SYN numbers of consecutive packets match? Does the app raise the reset flag along fin and ack? What happens if you try to establish a connection once again with the same socket?
By the way - I'd be surprised if the error originated in Qt, as Qt uses your system's mechanism of sending data through network, so it is the system that raises those flags. Qt can only request a connection to be closed. Maybe there is some error in Qt's socket state machine... hard to say, but I wouldn't blame it upfront.
1)Only fin,ack from my app and previous ack packet sequence and ack numbers equal.
2)Uh, i haven't understood a question.
fin,ack packet's rst flag is not set.
Or you talk about Qt class qtcpsocket's some kind of reset flag?
3) socket disconneting in the same way, but even after first syn|syn,ack|ack chain( i mean no http connection | http conenction established here )
Last edited by altVis; 6th April 2008 at 06:47.
I don't mean "equal". Do they match according to the TCP protocol? Syn numbers have to match with ACK numbers and vice-versa.
Yes, I mean the rst flag. If it's not set, the connection is not terminated but gracefully closed.2)Uh, i haven't understood a question.
fin,ack packet's rst flag is not set.
Or you talk about Qt class qtcpsocket's some kind of reset flag?
Could you provide a minimal compilable example reproducing the problem?3) socket disconneting in the same way, but even after first syn|syn,ack|ack chain( i mean no http connection | http conenction established here )
Yes. Of course.
Yeap, i know. Same thing like with disconnectFromHost.
Well. For now i have solved problem in a horrible way:
Qt Code:
delete socket; socket->connectToHost(...) // new connection;To copy to clipboard, switch view to plain text mode
I'll try to write some code later.
Bookmarks