SocketFactory instead of socket fix