-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue #3648 - SimpleContainerScope should use WebSocket Behavior for SSL defaults #3651
Conversation
…SSL defaults Signed-off-by: Joakim Erdfelt <[email protected]>
{ | ||
QueuedThreadPool threadPool = new QueuedThreadPool(); | ||
String behavior = "Container"; | ||
if (policy != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this null check here? You would have already gotten a NPE at line 142 above, no?
@@ -166,4 +133,44 @@ public void removeSessionListener(WebSocketSessionListener listener) | |||
{ | |||
return sessionListeners; | |||
} | |||
|
|||
@Override | |||
protected void doStart() throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's right to move the initialization code that before was in the constructor to doStart()
.
For example, WebSocketClient
constructor calls HttpClientProvider.get(scope)
passing in a scope that is not yet started, which get passed to DefaultHttpClientProvider.newHttpClient(scope)
which uses the scope before it's started.
I think we need a better review of the lifecycle of the scope to move things to a different place.
Signed-off-by: Joakim Erdfelt <[email protected]>
|
I am going to submit 3 separate PRs for this.
|
Signed-off-by: Joakim Erdfelt [email protected]