add try-except blocks for a socket connection
Merge branch 'client_api' into pas_plugin