Changed timeout values to 20 seconds and 10 minutes depending on connection state