wahjam/wahjam — pull request #52 by stefanha (2012-06-01 21:07:51+00:00)
Title: Flush Net_Connection socket before close()

Data written to QTcpSocket is not sent immediately so that several small
writes can generate a single TCP packet on the wire instead of many
small packets. This is normally no problem since the data will be
sent automatically later, from the event loop.

When a QTcpSocket is closed we need to call flush() to try sending any
remaining data. This turns out to be important for the status user in
Wahjam because the server enqueues several packets and then closes the
connection to the client.

Signed-off-by: Stefan Hajnoczi