Fix potential crash if context is null on closed socket

If the other side closes the connection this might happen
Without this check the following m_context.readBuffer would segfault
This commit is contained in:
WebFreak001 2018-12-20 02:20:41 +01:00
parent c8ab6ae2f8
commit bc3b319783

View file

@ -580,7 +580,7 @@ mixin(tracer);
asyncAwaitAny!(true, waiter)(timeout);
if (cancelled) return false;
if (cancelled || !m_context) return false;
logTrace("Socket %s, read %s bytes: %s", m_socket, nbytes, status);