Make sure everything is written to the socket