diff options
-rw-r--r-- | vxi11_server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vxi11_server.c b/vxi11_server.c index 0f2c91d..1f0ac4f 100644 --- a/vxi11_server.c +++ b/vxi11_server.c @@ -391,6 +391,14 @@ destroy_link_1_svc(Device_Link *argp, struct svc_req *rqstp) { if (!isValidLink(lid)) result.error = ERR_INVALIDLINKINDENTIFIER; else { + + if (haveLock(*argp)) { +#ifdef DEBUG + printf("Disconnecting client was holding a lock, freeing it\n"); +#endif + unlock(); + } + globals.Remote.vxi_connections--; #ifdef DEBUG printf("link %d destroyed, %d active links\n", lid, globals.Remote.vxi_connections); |