fix: handling of socket errors
Merge pull request #63 from eldargab/socket_errors

fix: handling of socket errors