--- a/src/httpgate.cpp
+++ b/src/httpgate.cpp
@@ -292,6 +292,7 @@
 
 static void *audioEater(void *cls)
 {
+    LOGDEB("audioEater: http\n");
     AudioEater::Context *ctxt = (AudioEater::Context*)cls;
 
     LOGDEB("audioEater: queue " << ctxt->queue << " HTTP port " << ctxt->port 
@@ -314,6 +315,8 @@
 
     WorkQueue<AudioMessage*> *queue = ctxt->queue;
     delete ctxt;
+    ctxt = 0;
+
     while (true) {
         AudioMessage *tsk = 0;
         size_t qsz;