Commit 96d623b4 authored by jan.koester's avatar jan.koester
Browse files

bugfix



Co-authored-by: default avatarCopilot <copilot@github.com>
parent 5c2f474c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -164,6 +164,12 @@ quic::~quic() {
    if (_parent != nullptr) {
        _parent->_child_connections.erase(_original_dcid);
        _parent->_child_connections.erase(_local_cid);
        // Child connections share the parent's socket fd — do NOT close it.
        // Invalidate _Socket so that ~udp() won't call ::close() on the
        // parent's listening socket (which would cause a double-close /
        // "free(): invalid pointer" crash when the parent or another child
        // tries to use the already-closed fd).
        _Socket = -1;
    }
    
    // Clean up streams