                 delegate?.tcp?(session: self, error: error)
             }
             
-            _flags = 0
-            _timer.invalidate()
+            close()
         }
     }
     

    @objc optional func tcp(session:TCPSession, sendEvent:Stream.Event)
    @objc optional func tcp(session:TCPSession, readEvent:Stream.Event)
    @objc optional func tcp(session:TCPSession, error:Error)
}

extension Stream.Event

        
        _queue.removeAll(keepingCapacity: false)
        _timer.invalidate()
        _flags = 0
        
        delegate?.close?()
    }
    
    deinit
