Using new methods for closing socket when onDestroy is called. Socket is no longer closed automatically.