crash occurs faster when connection is closed after receiving a reply from the server