ipc: disconnect client on xrDestroyInstance()

The service considers clients to be connected as long as the fd is not closed.
After destroying an XrInstance this prevents the client from creating a subsequent XrInstance.
This commit is contained in:
Christoph Haag 2020-05-01 02:49:44 +02:00
parent a4dcdf1f0b
commit a195f22bc3

View file

@ -145,6 +145,10 @@ ipc_client_instance_destroy(struct xrt_instance *xinst)
{ {
struct ipc_client_instance *ii = ipc_client_instance(xinst); struct ipc_client_instance *ii = ipc_client_instance(xinst);
// service considers us to be connected until fd is closed
if (ii->ipc_c.socket_fd >= 0)
close(ii->ipc_c.socket_fd);
free(ii); free(ii);
} }