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

fix: EdmEvent connectEvent insert channel only for event protocol type #70

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

KennethKnudsen97
Copy link
Contributor

@KennethKnudsen97 KennethKnudsen97 commented Oct 26, 2023

When receiving an Ipv4ConnectEvent we have a for loop that goes through each socket and updates the socketmap.
The function TcpSocket::downcast(s) only take in a TCP socket and UdpSocket::downcast(s) only takes in UPD socket. We had a problem because we didn't check what type of protocol the socket in Sockets was. This resulted in passing a TCP socket to UdpSocket::downcast(s). The same thing could happen the other way around.

  • Fix Ipv4connectEvent downcast problem
  • Fix remove peer upon error and close socket.

@MathiasKoch MathiasKoch merged commit 7f09a6a into master Oct 30, 2023
5 checks passed
@MathiasKoch MathiasKoch deleted the fix/ConnectEvent branch October 30, 2023 15:00
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