You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2021/05/26 15:35:53 UTC

[GitHub] [thrift] fishy commented on a change in pull request #2399: THRIFT-5411: Catch SocketTimeoutException in TIOStreamTransport read

fishy commented on a change in pull request #2399:
URL: https://github.com/apache/thrift/pull/2399#discussion_r639849612



##########
File path: lib/java/src/org/apache/thrift/transport/TIOStreamTransport.java
##########
@@ -174,6 +175,8 @@ public int read(byte[] buf, int off, int len) throws TTransportException {
     int bytesRead;
     try {
       bytesRead = inputStream_.read(buf, off, len);
+    } catch (SocketTimeoutException ste) {
+      throw new TTransportException(TTransportException.TIMED_OUT, ste);

Review comment:
       I'm not familiar with the java library code so this might be a stupid question: is it that we already handled `TTransportException` with `TIMED_OUT` in the library code, so translating those `SocketTimeoutException` into `TTransportException` would be enough to resolve the issue reported?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org