added exception handling and reconnection logic
Merge pull request #1361 from wfrench/fixdsa_rebase2

added exception handling and reconnection logic