X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-pdu-assoc-thread.cpp;h=f91fecec925b9973b3621e11f800b62367faf2d9;hb=a0042915b20e2a1d15efa254c35e22cf09e0796a;hp=23b930805cdd1f183c0c20c4a6b312190afa9f60;hpb=594ba02c8c039a6570451da08e3461f22a7d0d11;p=yazpp-moved-to-github.git diff --git a/src/yaz-pdu-assoc-thread.cpp b/src/yaz-pdu-assoc-thread.cpp index 23b9308..f91fece 100644 --- a/src/yaz-pdu-assoc-thread.cpp +++ b/src/yaz-pdu-assoc-thread.cpp @@ -1,8 +1,6 @@ -/* - * Copyright (c) 1998-2004, Index Data. +/* This file is part of the yazpp toolkit. + * Copyright (C) 1998-2008 Index Data and Mike Taylor * See the file LICENSE for details. - * - * $Id: yaz-pdu-assoc-thread.cpp,v 1.13 2005-10-10 15:59:43 adam Exp $ */ #ifdef WIN32 @@ -30,8 +28,8 @@ #include #include -#include -#include +#include +#include using namespace yazpp_1; @@ -82,6 +80,14 @@ void PDU_AssocThread::childNotify(COMSTACK cs) /// Clone PDU Observer new_observable->m_PDU_Observer = m_PDU_Observer->sessionNotify(new_observable, cs_fileno(cs)); + + if (!new_observable->m_PDU_Observer) + { + new_observable->shutdown(); + delete new_observable; + delete socket_observable; + return; + } worker *w = new worker; w->m_assoc = new_observable;