This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 3ccef5c THRIFT-5432 TSaslTransport throw TTransportException of
MaxMessageSize reached Client: java Patch: GuangMing Lu
3ccef5c is described below
commit 3ccef5cecd131077782038cf2be3a6a471c467c5
Author: l00508282 <[email protected]>
AuthorDate: Wed Jun 16 23:25:45 2021 +0800
THRIFT-5432 TSaslTransport throw TTransportException of MaxMessageSize
reached
Client: java
Patch: GuangMing Lu
---
lib/java/src/org/apache/thrift/transport/TSaslTransport.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
index b106c70..b22469d 100644
--- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
@@ -72,7 +72,7 @@ abstract class TSaslTransport extends TEndpointTransport {
/**
* Buffer for input.
*/
- private TMemoryInputTransport readBuffer = new TMemoryInputTransport();
+ private TMemoryInputTransport readBuffer;
/**
* Buffer for output.
@@ -89,6 +89,7 @@ abstract class TSaslTransport extends TEndpointTransport {
protected TSaslTransport(TTransport underlyingTransport) throws
TTransportException {
super(Objects.isNull(underlyingTransport.getConfiguration()) ? new
TConfiguration() : underlyingTransport.getConfiguration());
this.underlyingTransport = underlyingTransport;
+ this.readBuffer = new
TMemoryInputTransport(underlyingTransport.getConfiguration());
}
/**
@@ -104,6 +105,7 @@ abstract class TSaslTransport extends TEndpointTransport {
super(Objects.isNull(underlyingTransport.getConfiguration()) ? new
TConfiguration() : underlyingTransport.getConfiguration());
sasl = new SaslParticipant(saslClient);
this.underlyingTransport = underlyingTransport;
+ this.readBuffer = new
TMemoryInputTransport(underlyingTransport.getConfiguration());
}
protected void setSaslServer(SaslServer saslServer) {