• Stéphane Graziano's avatar
    clientStream were undisposed. · 715a26d3
    Stéphane Graziano authored
    ```------------------------
    //1st clientStream
    var clientStream = new CustomBufferedStream(clientConnection.GetStream(), BufferPool, BufferSize);
    sslStream = new SslStream(clientStream, false); //false => do not dispose 1st ClientStream
    //2nd clientStream
    clientStream = new CustomBufferedStream(sslStream, BufferPool, BufferSize);
    
    ...
    
    sslStream?.Dispose(); // dispose sslStream but not 1st ClientStream
    clientStream.Dispose(); // dispose 2nd ClientStream, sslStream (already disposed)
    //here 1st clientStream is not disposed
    ```
    
    ------------------------
    715a26d3
TransparentClientHandler.cs 7.61 KB