s3:rpc_transport_np: use cli_state_is_connected() helper
[ira/wip.git] / source3 / rpc_client / rpc_transport_np.c
index de734fe17dad83ec903a17f49f69565b686d6341..5b6a2d6ae04a53ad064c0b13dc31f3dbc0418b7d 100644 (file)
@@ -30,7 +30,7 @@ struct rpc_transport_np_state {
 
 static int rpc_transport_np_state_destructor(struct rpc_transport_np_state *s)
 {
-       if (s->cli->fd == -1) {
+       if (!cli_state_is_connected(s->cli)) {
                DEBUG(10, ("socket was closed, no need to send close request.\n"));
                return 0;
        }