Let TCPConnection.peek() handle closed connections gracefully.

This commit is contained in:
Sönke Ludwig 2017-01-30 17:27:43 +01:00
parent 02e00944f6
commit b7e996cd8c
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -518,7 +518,7 @@ mixin(tracer);
return m_context.readBuffer.length > 0;
}
const(ubyte)[] peek() { return m_context.readBuffer.peek(); }
const(ubyte)[] peek() { return m_context ? m_context.readBuffer.peek() : null; }
void skip(ulong count)
{