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

Netty factory: Close TCP connection when receive TLS close notify #1220

Merged

Conversation

vladimirlagunov
Copy link
Contributor

@vladimirlagunov vladimirlagunov commented Jul 15, 2019

TLS has special TLS Alert message "close_notify". After receiving such packet any conversation
should be immediately stopped. Some TLS implementations (OpenSSL for example) closes underlying TCP connection when TLS connection being closed, some (Docker SSL server and docker-java before current commit) does not close. AttachContainerCmd executes onComplete callback only when TCP connection closes, so without this patch onComplete called after a long timeout, with this patch it called when container exits.


This change is Reviewable

TLS has special TLS Alert message "close_notify". After receiving such packet any conversation
should be immediately stopped. Some TLS implementations (OpenSSL for example) closes underlying TCP
connection when TLS connection being closed, some (Docker SSL server and docker-java before current
commit) does not close. AttachContainerCmd executes `onComplete` callback only when TCP connection
closes, so without this patch `onComplete` called after a long timeout, with this patch it called
when container exits.
@KostyaSha KostyaSha added this to the 3.1.4 milestone Jul 18, 2019
@KostyaSha KostyaSha merged commit f760f0c into docker-java:master Jul 18, 2019
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