Fix for running on lan using IP address

Thanks for this SSL implementation. When I run on my local LAN the socket disconnects because it is trying to do something with the hostname before it is running under the writer thread and hits the "no network on UI thread" prevention, then throws an internal error with no error text because getLocalizedMessage returns nothing. These changes fix the issue for me.

Adam