Skip to content

Conversation

@stIncMale
Copy link
Member

@stIncMale stIncMale commented Sep 25, 2023

Notably, Socket.close may also block if one enables SO_LINGER by calling Socket.setSoLinger, yet there is not a word on interruptibility of Socket.close in the docs. Fortunately, we don't enable SO_LINGER, so we don't have to care about the behavior of Socket.close.

JAVA-5138

@stIncMale stIncMale self-assigned this Sep 25, 2023
JAVA-5138
Copy link
Collaborator

@jyemin jyemin left a comment

Choose a reason for hiding this comment

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

LGTM

inputStream = socket.getInputStream();
} catch (IOException e) {
close();
throw new MongoSocketOpenException("Exception opening socket", getAddress(), e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's worth a ticket to make this consistent with read/write methods to throw IOException and do the exception transation in InternalStreamConnection. It can be dependent on the ticket to remove Stream from the API.

Copy link
Member Author

Choose a reason for hiding this comment

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

stIncMale added a commit to stIncMale/mongo-java-driver that referenced this pull request Sep 29, 2023
@stIncMale stIncMale merged commit ea4647b into mongodb:master Sep 29, 2023
@stIncMale stIncMale deleted the JAVA-5138 branch September 29, 2023 04:14
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.

3 participants