Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Eliminate double initialization of SSLSession in GelfTCPSSLSender #182

Conversation

alexander-katanov
Copy link
Contributor

Fixes #181

@mp911de mp911de added this to the 1.13.0 milestone Jan 22, 2019
Move initialization of sslEngine after connect happened
this.sslEngine = sslContext.createSSLEngine();
this.sslEngine.setUseClientMode(true);
this.sslSession = sslEngine.getSession();
if (isConnected()) {
Copy link
Owner

Choose a reason for hiding this comment

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

This check is superfluous as super.connect() does the same check. We can safely remove this if block here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed

remove redundant check
mp911de pushed a commit that referenced this pull request Jan 22, 2019
We now initialize the SSL Engine after the TCP connect succeeded. This change prevents concurrent connects from double initialization of the SSL Engine. It also defers resource creation to a time where we know that the TCP connect was successful.

Original pull request: #182.
mp911de added a commit that referenced this pull request Jan 22, 2019
Add author tags. Improve synchronization in test. Reformat code.

Original pull request: #182
@mp911de mp911de added the type: bug A general bug label Jan 22, 2019
@mp911de
Copy link
Owner

mp911de commented Jan 22, 2019

That's squashed, merged and polished now. Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants