Adding inactivity time (10 seconds). If the server doesn't receive anything on the connection it will send a ping. The response should reset the timer.