eclipse-ee4j / eclipse-ee4j/tyrus

connectToServer is not thread safe due to thread-safety issues with TyrusClientEngineState

Open
#663 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
128
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Workflow:
1. Create 2 threads, each having its own instance of ClientManager, AuthConfig and Authenticator
2. When calling connectToServer on both threads simultaneously, its possible the AuthConfig Authenticator instance from Thread A is used when trying to connect on Thread B

The issue is with the TyrusClientEngineState enum and the fact the code is storing the authenticator and wwwAuth header and passing it around on the static enums.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.