File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed 
libraries/lwIpWrapper/src Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -363,9 +363,12 @@ void lwipClient::stop() {
363363
364364    //  reset all the other variables in this class
365365
366-     //  if(tcp->p != nullptr) {
367-     //      pbuf_free(tcp->p); // FIXME it happens that a pbuf, with ref == 0 is added for some reason
368-     //  }
366+     if (this ->tcp_info ->pbuf_head  != nullptr ) {
367+         pbuf_free (this ->tcp_info ->pbuf_head ); //  FIXME it happens that a pbuf, with ref == 0 is added for some reason
368+         this ->tcp_info ->pbuf_head  = nullptr ;
369+     }
370+     this ->tcp_info ->pbuf_offset  = 0 ;
371+ 
369372    if (this ->tcp_info ->server  != nullptr ) {
370373        //  need to first make the server point to nullptr, then remove the client, can cause infinite recursion
371374        auto  server = this ->tcp_info ->server ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments