Commit 6d795473 authored by Marc Gravell's avatar Marc Gravell

Fix NRE (issue 17)

parent d475b568
...@@ -137,9 +137,13 @@ public void Dispose() ...@@ -137,9 +137,13 @@ public void Dispose()
public void Flush() public void Flush()
{ {
outStream.Flush(); var tmp = outStream;
if (tmp != null)
{
tmp.Flush();
Interlocked.Exchange(ref lastWriteTickCount, Environment.TickCount); Interlocked.Exchange(ref lastWriteTickCount, Environment.TickCount);
} }
}
public void RecordConnectionFailed(ConnectionFailureType failureType, Exception innerException = null, [CallerMemberName] string origin = null) public void RecordConnectionFailed(ConnectionFailureType failureType, Exception innerException = null, [CallerMemberName] string origin = null)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment