mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibHTTP: Null out on_ready_to_read on socket close
This fixes the segfault reported in #15283. on_ready_to_read gets re-registered on every job start anyways. I see no reason why this could be bad.
This commit is contained in:
parent
3cf6ac1b3f
commit
55c099c953
1 changed files with 1 additions and 0 deletions
|
@ -127,6 +127,7 @@ void Job::shutdown(ShutdownMode mode)
|
|||
return;
|
||||
if (mode == ShutdownMode::CloseSocket) {
|
||||
m_socket->close();
|
||||
m_socket->on_ready_to_read = nullptr;
|
||||
} else {
|
||||
m_socket->on_ready_to_read = nullptr;
|
||||
m_socket = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue