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:
parent
c8ab6ae2f8
commit
bc3b319783
|
@ -580,7 +580,7 @@ mixin(tracer);
|
||||||
|
|
||||||
asyncAwaitAny!(true, waiter)(timeout);
|
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);
|
logTrace("Socket %s, read %s bytes: %s", m_socket, nbytes, status);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue