added proper timeout for retry reconnection