Changeset: e9efcf67157b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9efcf67157b
Modified Files:
        monetdb5/modules/mal/mal_mapi.c
Branch: Jun2016
Log Message:

When creating thread fails, clean up and don't register non-existent thread.


diffs (15 lines):

diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -374,8 +374,9 @@ SERVERlistenThread(SOCKET *Sock)
                        showException(GDKstdout, MAL, "initClient",
                                                  "cannot fork new client 
thread");
                        GDKfree(data);
-               }
-               GDKregister(tid);
+                       closesocket(msgsock);
+               } else
+                       GDKregister(tid);
        } while (!ATOMIC_GET(serverexiting, atomicLock) &&
                         !GDKexiting());
        (void) ATOMIC_DEC(nlistener, atomicLock);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to