Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - takkai

Pages: [1]
1
Network / [SOLVED] program stops with exit status 141, sf::TcpSocket::send()
« on: September 07, 2012, 06:57:43 pm »
Hi,
in my tcp server my loop is like this

loop:
   r[] = receive clients
   ret = process r
   send clients ret
 

when the clients disconnect, they send a "I'm disconnecting" message to the server.
currently my server just ignores it (while I'm trying to make a game server that don't trust the client)
then when the server sends to the disconnected client, the server exits without any error message, only the returned status from the program $? being 141.

If I modify the clients to wait 2 seconds after sending their last message and before disconnecting the socket, then the server don't crash and continue to serve the other clients, because then it receives the status sf::Socket::Disconnected from the next socket->receive() call.

What did I make wrong?
How can I fix this?

(I'm using a recent git snapshot, 2012-08-20)
Thanks

Pages: [1]
anything