PDA

View Full Version : Remote host closed error



xeyos
19th August 2014, 00:53
Hi im working on a networking windows/linux app and im ive got a weird problem that is driving me crazy.
I connect 2 QTcpSockets and make'em talk. then iddle and the control of the net comes to the user (is a chat like app),the thing is... suddenly one of this sockets tells me to read an "Remote host closed" error and gets disconnected while, the other side continue working without a problem. I can cal socket.write all the times i want, no errors.. but the data, obviously, never reach destination.
any idea what can cause this behaviour?

edit: some more data
Ivegot 2 roles, client (the caller) and server(who is called) but theyre bassically the same class.

If i call from linux to windows... whats described before is exactly what happens.
If i call from windows to linux, BOTH sockets detect remote host closed

edit 2--------------------
well desperated after 2 days fighting this irregular error, i tried it with local ips. It seems to work perfectly. weve got 100Mb bandwith here and no connection problems ever... would it be normal for a simple chat app to suffer random disconnection over QTcpSocket, on a seconds matter, as described? should i just implement a reconnecting system even if its called every N seconds?

anda_skoa
19th August 2014, 08:16
Random disconnects on idle connections smells a lot like a firewall dropping inactive connections.

Cheers,
_