Author: brandonwilliams Date: Tue Jul 20 20:29:25 2010 New Revision: 965987
URL: http://svn.apache.org/viewvc?rev=965987&view=rev Log: Reset the input and output protocol on each after each successful call. Patch by Nate McCall, reviewed by brandonwilliams for CASSANDRA-475 Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java?rev=965987&r1=965986&r2=965987&view=diff ============================================================================== --- cassandra/trunk/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java (original) +++ cassandra/trunk/src/java/org/apache/cassandra/thrift/CustomTThreadPoolServer.java Tue Jul 20 20:29:25 2010 @@ -164,7 +164,11 @@ private class WorkerProcess implements R outputProtocol = outputProtocolFactory_.getProtocol(outputTransport); // we check stopped_ first to make sure we're not supposed to be shutting // down. this is necessary for graceful shutdown. - while (!stopped_ && processor.process(inputProtocol, outputProtocol)) {} + while (!stopped_ && processor.process(inputProtocol, outputProtocol)) + { + inputProtocol = inputProtocolFactory_.getProtocol(inputTransport); + outputProtocol = outputProtocolFactory_.getProtocol(outputTransport); + } } catch (TTransportException ttx) { // Assume the client died and continue silently } catch (TException tx) {
