add infinite loop to try reconnection