[JAVA-3275] Use Input & OutputStreams to read and write instead of SocketChannel.read/write Created: 25/Apr/19  Updated: 28/Oct/23  Resolved: 16/May/19

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.11.0

Type: Bug Priority: Major - P3
Reporter: Ross Lawley Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Apparently using SocketChannel.read/SocketChannel.write will not adhere to the socket timeout.

See: PR https://github.com/mongodb/mongo-java-driver/pull/509



 Comments   
Comment by Githook User [ 16/May/19 ]

Author:

{'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}

Message: Remove SocketChannelStream

SocketChannel does not support timeouts so it's not safe to use in the
driver. This commit removes SocketChannelStream and replaces previous
usage with SocketStream

JAVA-3275
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c71a6b09daf43edb80210d4edc95d36f107e163e

Comment by Jeffrey Yemin [ 25/Apr/19 ]

See also https://technfun.wordpress.com/2009/01/29/networking-in-java-non-blocking-nio-blocking-nio-and-io/ (referenced indirectly by the PR).

Generated at Thu Feb 08 08:59:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.