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

Add ListenSCTPExt & DailSCTPExt to pass InitOptions; fixes for IPv6 & local port bind support #24

Closed
wants to merge 12 commits into from

Conversation

emakeev
Copy link
Contributor

@emakeev emakeev commented Jul 11, 2018

No description provided.

1) Fix to avoid returning negative read lenth on failed SCTP Reads (it breaks std Go buffered IO)
2) Atomic access to internal SCTP Connection fd & connection close FD cleanup to prevent "double" fd closure
which may affect another connection in multithreaded environments.
1) Fix to avoid returning negative read lenth on failed SCTP Reads (it breaks std Go buffered IO)
2) Atomic access to internal SCTP Connection fd & connection close FD cleanup to prevent "double" fd closure
which may affect another connection in multithreaded environments.
@ishidawataru
Copy link
Owner

@emakeev Thank you for the fix. Could you fix the conflicts?

sctp_linux.go Outdated
@@ -128,8 +128,13 @@ func ListenSCTPExt(network string, laddr *SCTPAddr, options InitMsg) (*SCTPListe
if err != nil {
return nil, err
}
if err = setDefaultSockopts(sock, af, ipv6only); err != nil {
syscall.Close(sock)
Copy link
Owner

Choose a reason for hiding this comment

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

@emakeev How about using defer ?

@emakeev
Copy link
Contributor Author

emakeev commented Jul 13, 2018

switched ListenSCTPExt & DailSCTPExt cleanup to use defer. Don't see any merge conflicts on my side...

@ishidawataru
Copy link
Owner

@emakeev This project uses rebase and merge manner to merge PRs. Please rebase your branch on the current master

@emakeev emakeev closed this Jul 13, 2018
@emakeev
Copy link
Contributor Author

emakeev commented Jul 13, 2018

sorry, I cannot resolve conflicts, I do not see. my remote was rebased to master. I'll create new PR

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.

None yet

2 participants