Click here to Skip to main content
14,297,726 members

Comments by Dan Sporici (Top 1 by date)

Dan Sporici 20-Sep-16 17:42pm View
   
Posting this as a comment because I'm not sure if I get it right...but why wouldn't you wrap the connection part in a try-catch block and then in a while loop. And just use a variable to signal if the connection succeeded (just add it below the connection method's call, if it fails the value isn't changed => retry); and also a sleep for a few seconds between failed connections.