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

Fix NRE (issue 17)

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