mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
THRIFT-604: rb: nonblocking_server assumes that socket.read returns exactly one message
This patch causes every message currently in the buffer to be processed before going on. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@899725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62fb2ed1fe
commit
8d41b643f9
@ -160,8 +160,7 @@ module Thrift
|
||||
|
||||
def read_connection(fd)
|
||||
@buffers[fd] << fd.read(DEFAULT_BUFFER)
|
||||
frame = slice_frame!(@buffers[fd])
|
||||
if frame
|
||||
while(frame = slice_frame!(@buffers[fd]))
|
||||
@logger.debug "#{self} is processing a frame"
|
||||
@worker_queue.push [:frame, fd, frame]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user