Added support for socket error retries, handler for errors, passed resul...

...t through even on error (so _retry information is accessible)