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

Fix NRE (issue 17)

parent d475b568
...@@ -137,8 +137,12 @@ public void Dispose() ...@@ -137,8 +137,12 @@ public void Dispose()
public void Flush() public void Flush()
{ {
outStream.Flush(); var tmp = outStream;
Interlocked.Exchange(ref lastWriteTickCount, Environment.TickCount); if (tmp != null)
{
tmp.Flush();
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