--- libaitrpc/src/srv.c 2010/07/08 08:02:02 1.1.1.1.2.19 +++ libaitrpc/src/srv.c 2010/07/08 12:29:38 1.1.1.1.2.20 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.1.1.1.2.19 2010/07/08 08:02:02 misho Exp $ +* $Id: srv.c,v 1.1.1.1.2.20 2010/07/08 12:29:38 misho Exp $ * *************************************************************************/ #include "global.h" @@ -411,6 +411,7 @@ rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv) } pthread_mutex_unlock(&srv->srv_blob.mtx); + while (pthread_mutex_trylock(&srv->srv_blob.mtx) == EBUSY); pthread_mutex_destroy(&srv->srv_blob.mtx); } @@ -625,6 +626,7 @@ rpc_srv_endServer(rpc_srv_t * __restrict srv) } pthread_mutex_unlock(&srv->srv_mtx); + while (pthread_mutex_trylock(&srv->srv_mtx) == EBUSY); pthread_mutex_destroy(&srv->srv_mtx); free(srv);