Skip to content

Commit

Permalink
THRIFT-2530: Fix TIOStreamTransport#isOpen
Browse files Browse the repository at this point in the history
isOpen should return false when close is called.

Client: java

This closes #1878.
  • Loading branch information
qinghui-xu authored and dcelasun committed Oct 10, 2019
1 parent 85d8162 commit ab89b8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- [THRIFT-4712](https://issues.apache.org/jira/browse/THRIFT-4712) - java: class org.apache.thrift.ShortStack is no longer public
- [THRIFT-4725](https://issues.apache.org/jira/browse/THRIFT-4725) - java: change return type signature of 'process' methods
- [THRIFT-4805](https://issues.apache.org/jira/browse/THRIFT-4805) - java: replaced TSaslTransportException with TTransportException
- [THRIFT-2530](https://issues.apache.org/jira/browse/THRIFT-2530) - java: TIOStreamTransport's "isOpen" now returns false after "close" is called
- [THRIFT-4675](https://issues.apache.org/jira/browse/THRIFT-4675) - js: now uses node-int64 for 64 bit integer constants
- [THRIFT-4841](https://issues.apache.org/jira/browse/THRIFT-4841) - delphi: old THTTPTransport is now TMsxmlHTTPTransport
- [THRIFT-4536](https://issues.apache.org/jira/browse/THRIFT-4536) - rust: convert from try-from crate to rust stable (1.34+), re-export ordered-float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@ public TIOStreamTransport(InputStream is, OutputStream os) {
}

/**
* The streams must already be open at construction time, so this should
* always return true.
*
* @return true
* @return false after close is called.
*/
public boolean isOpen() {
return true;
return inputStream_ != null && outputStream_ != null;
}

/**
Expand Down

0 comments on commit ab89b8b

Please sign in to comment.