summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_client/rpc_transport_np.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_client/rpc_transport_np.c b/source3/rpc_client/rpc_transport_np.c
index de734fe17d..5b6a2d6ae0 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -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;
}