From 58031bcb768f927d18ce7f781feff528855eefbd Mon Sep 17 00:00:00 2001 From: dscho Date: Sat, 29 Sep 2001 14:55:25 +0000 Subject: more pthread debugging --- sockets.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sockets.c') diff --git a/sockets.c b/sockets.c index fe20c49..9721110 100644 --- a/sockets.c +++ b/sockets.c @@ -252,10 +252,14 @@ void rfbCloseClient(cl) rfbClientPtr cl; { + pthread_mutex_lock(&cl->updateMutex); FD_CLR(cl->sock,&(cl->screen->allFds)); - rfbClientConnectionGone(cl); close(cl->sock); cl->sock = -1; + pthread_cond_signal(&cl->updateCond); + pthread_mutex_lock(&cl->updateMutex); + rfbClientConnectionGone(cl); + pthread_mutex_unlock(&cl->updateMutex); } -- cgit v1.2.3