Comment update.
authorDavin McCall <davmac@davmac.org>
Mon, 23 Nov 2015 07:42:13 +0000 (07:42 +0000)
committerDavin McCall <davmac@davmac.org>
Mon, 23 Nov 2015 07:42:13 +0000 (07:42 +0000)
control.cc

index 32447e642796c37de9bdfc62b66363407cff7d69..df992fa7f63ef3635032cb20efb3a61b411eb30f 100644 (file)
@@ -1,10 +1,13 @@
 #include "control.h"
 #include "service.h"
 
-// TODO queuePacket can close connection, so make sure not to touch instance variables after calling it
 void ControlConn::processPacket()
 {
     using std::string;
+    
+    // Note that where we call queuePacket, we must generally check the return value. If it
+    // returns false it has either deleted the connection or marked it for deletion; we
+    // shouldn't touch instance members after that point.
 
     int pktType = iobuf[0];
     if (pktType == DINIT_CP_STARTSERVICE || pktType == DINIT_CP_STOPSERVICE) {