Instead of depending on the implementation of isConnected() method, we assume the connection is ok, when the socket is not null. Writing or reading from a closed/not connected socket will trigger an error like normal.
This is done because isConnected() always returns false on some devices.
Instead of depending on the implementation of isConnected() method, we assume the connection is ok, when the socket is not null. Writing or reading from a closed/not connected socket will trigger an error like normal. This is done because isConnected() always returns false on some devices.