THRIFT-637. python: Fix mixing of oneway and regular requests in TNonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@886646 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/server/TNonblockingServer.py b/lib/py/src/server/TNonblockingServer.py
index deec708..ea348a0 100644
--- a/lib/py/src/server/TNonblockingServer.py
+++ b/lib/py/src/server/TNonblockingServer.py
@@ -178,11 +178,12 @@
self.wake_up()
return
self.len = ''
- self.message = struct.pack('!i', len(message)) + message
if len(message) == 0:
# it was a oneway request, do not write answer
+ self.message = ''
self.status = WAIT_LEN
else:
+ self.message = struct.pack('!i', len(message)) + message
self.status = SEND_ANSWER
self.wake_up()