fix #921 by passing socket.error on to the caller (where it will be ignored)