title: omnet++ delete a module element
body: <p>I need to delete sensor node if its energy level is less than 0.Every sensor nodes has inout gate.Every sensor node is also connected to the LCN.LCN has inout gate.
   I wrote this code to delete the module.</p>
  
  <pre><code>if(totPower&lt;0){
         deleteModule();
         callFinish();
      }
  </code></pre>
  
  <p>it works but If another request is came to this lcn to sensing data, Lcn assume this deleted sensor module is still connected to it and throws connection error.How can I solve this problem?By the way I am using just Omnet++, not inet,castalia etc.</p>
  
  <pre><code>&lt;!&gt; Error in module (LCN) Network.lcn[7] (id=254) at event #188, t=1200: send()/sendDelayed(): gate `lcnSN$o[11]' not connected.
  </code></pre>