Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, January 2007
QTSocket and rapid disconnection?


Message 1 in thread

I am currently using QT 4.0.1 (later versions cause strange crashes on 
the hardware I'm using) on Windows and am experiencing a problem with 
QTSocket. Specifically, if I open my socket (using connectToHost) and it 
connects the first time, it is fine. However, if I then use 
connectToHost again with a new host/port (without having successfully 
made a connection after the first command) it makes the new connection 
and then immediately disconnects on the other end. A strange sequence of 
connections is then made, but in the end, data can be sent, as long as 
the server continues to listen on the port it's connecting to.

The issue is that while QT's sockets handle this weird rapid-fire 
connection/disconnection on the receiving end, Java's don't (the first 
disconnection ends it all.) So I'm wondering if anyone has experienced 
this, and whether there's a solution.

Thanks,
Mike S.





--
 [ signature omitted ] 

Message 2 in thread

Michael Simon wrote:
> I am currently using QT 4.0.1 (later versions cause strange crashes on
> the hardware I'm using) on Windows and am experiencing a problem with
> QTSocket. Specifically, if I open my socket (using connectToHost) and it
> connects the first time, it is fine. However, if I then use
> connectToHost again with a new host/port (without having successfully
> made a connection after the first command) it makes the new connection
> and then immediately disconnects on the other end. A strange sequence of
> connections is then made, but in the end, data can be sent, as long as
> the server continues to listen on the port it's connecting to.
> The issue is that while QT's sockets handle this weird rapid-fire
> connection/disconnection on the receiving end, Java's don't (the first
> disconnection ends it all.) So I'm wondering if anyone has experienced
> this, and whether there's a solution.

It's a known problem, and it has been fixed in later versions of Qt 4. There
are many different variants of this sudden disconnect, some fixed in 4.1.x,
but all known issues are, AFAIK, fixed in 4.2.2 and the upcoming 4.2.3.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Hi there,

I have experienced something similar running on linux (puppy, SuSE)
connecting to various unix/linux (SuSE, Solaris 2.9), windows (98, 2000, XP)
and some embedded systems (linux and ETS based). I actually built the first
connection and the server dropped my connection after a while due to lack of
traffic. Then problems started when the client tried to rebuild the
connection immediately afterwards. I tried with 4.1.4 and 4.2.0 and it was
the same every time.

I had mailing with the Trolls who probably closed the case as
irreproducible. Could you please check the attached ethereal capture to see
if you get something similar?

Cheers,
Sandor


-----Original Message-----
From: qt-interest-request@xxxxxxxxxxxxx
[mailto:qt-interest-request@xxxxxxxxxxxxx]On Behalf Of Michael Simon
Sent: 02/01/2007 16:50
To: qt-interest@xxxxxxxxxxxxx
Subject: QTSocket and rapid disconnection?


I am currently using QT 4.0.1 (later versions cause strange crashes on 
the hardware I'm using) on Windows and am experiencing a problem with 
QTSocket. Specifically, if I open my socket (using connectToHost) and it 
connects the first time, it is fine. However, if I then use 
connectToHost again with a new host/port (without having successfully 
made a connection after the first command) it makes the new connection 
and then immediately disconnects on the other end. A strange sequence of 
connections is then made, but in the end, data can be sent, as long as 
the server continues to listen on the port it's connecting to.

The issue is that while QT's sockets handle this weird rapid-fire 
connection/disconnection on the receiving end, Java's don't (the first 
disconnection ends it all.) So I'm wondering if anyone has experienced 
this, and whether there's a solution.

Thanks,
Mike S.





--
 [ signature omitted ] 

Attachment: QTcpSocket.cap
Description: Binary data


Message 4 in thread

Hadas Sandor wrote:
> I had mailing with the Trolls who probably closed the case as
> irreproducible. Could you please check the attached ethereal capture to
> see if you get something similar?

The bug was reproduced last fall; maybe you can try 4.2.2 or the 4.2
snapshots and see if the bug still persists?

Andreas

-- 
 [ signature omitted ] 

Message 5 in thread

It might have been fixed after 4.2.0, I do not know. It was there with
4.2.0, that is what I know for sure.

I will definitely try although not sure when since I am doing some other
things and my environment is not ready for this test at the moment.
Hopefully next week.

Bye,
Sandor

-----Original Message-----
From: qt-interest-request@xxxxxxxxxxxxx
[mailto:qt-interest-request@xxxxxxxxxxxxx]On Behalf Of Andreas Aardal
Hanssen
Sent: 02/01/2007 17:50
To: qt-interest@xxxxxxxxxxxxx
Subject: RE: QTSocket and rapid disconnection?


Hadas Sandor wrote:
> I had mailing with the Trolls who probably closed the case as
> irreproducible. Could you please check the attached ethereal capture to
> see if you get something similar?

The bug was reproduced last fall; maybe you can try 4.2.2 or the 4.2
snapshots and see if the bug still persists?

Andreas

-- 
 [ signature omitted ]