Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsquic #254

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

lsquic #254

wants to merge 1 commit into from

Conversation

turuslan
Copy link
Contributor

Signed-off-by: turuslan <[email protected]>
void QuicConnection::onClose() {
conn_ctx_ = nullptr;
}
} // namespace libp2p::transport
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line

server_.reset();
return outcome::success();
}
} // namespace libp2p::transport
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line

void QuicStream::onClose() {
stream_ctx_ = nullptr;
}
} // namespace libp2p::connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

src/transport/quic/transport.cpp Show resolved Hide resolved
auto conn_ctx = reinterpret_cast<ConnCtx *>(
lsquic_conn_get_ctx(lsquic_stream_conn(stream)));
// NOLINTNEXTLINE(cppcoreguidelines-owning-memory)
auto stream_ctx = new StreamCtx{self, stream};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to use new here instead of smart pointers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lsquic C api accepts void * (size_t) user argument, so it doesn't support C++ destructors,
but it provides callbacks which will cleanup these allocations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants