diff --git a/remoting/getty/getty_client.go b/remoting/getty/getty_client.go
index 7c0c7c90dcbe5a28316f70a546b0cd2bda566929..7edc1cf8c59f86a3f89c623b4ed02b6b0a0495ec 100644
--- a/remoting/getty/getty_client.go
+++ b/remoting/getty/getty_client.go
@@ -206,8 +206,10 @@ func (c *Client) Request(request *remoting.Request, timeout time.Duration, respo
 
 // isAvailable returns true if the connection is available, or it can be re-established.
 func (c *Client) IsAvailable() bool {
-	_, _, err := c.selectSession(c.addr)
-	return err == nil
+	client, _, err := c.selectSession(c.addr)
+	return err == nil &&
+		// defensive check
+		client != nil
 }
 
 func (c *Client) selectSession(addr string) (*gettyRPCClient, getty.Session, error) {