--- libaitrpc/src/srv.c 2012/05/17 11:01:30 1.9.2.20 +++ libaitrpc/src/srv.c 2012/05/17 11:16:20 1.9.2.21 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.9.2.20 2012/05/17 11:01:30 misho Exp $ +* $Id: srv.c,v 1.9.2.21 2012/05/17 11:16:20 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -592,8 +592,10 @@ rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv) if (!srv) return; - pthread_cancel(srv->srv_blob.tid); - pthread_join(srv->srv_blob.tid, NULL); + if (srv->srv_blob.tid) { + pthread_cancel(srv->srv_blob.tid); + pthread_join(srv->srv_blob.tid, NULL); + } /* close all clients connections & server socket */ for (i = 0; i < io_arraySize(srv->srv_blob.clients); i++) {