Let TCPConnection.peek() handle closed connections gracefully.
This commit is contained in:
parent
02e00944f6
commit
b7e996cd8c
|
@ -518,7 +518,7 @@ mixin(tracer);
|
||||||
return m_context.readBuffer.length > 0;
|
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)
|
void skip(ulong count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue