Fix rpc sender thread busy looping (#2655)

This commit is contained in:
Andras Slemmer 2018-02-27 12:14:57 +00:00 committed by Katelyn Baker
parent b625dc7417
commit aafd8401ad

View File

@ -210,7 +210,7 @@ class RPCServer(
return thread(name = "rpc-server-sender", isDaemon = true) {
var deduplicationSequenceNumber = 0L
while (true) {
val job = sendJobQueue.poll()
val job = sendJobQueue.take()
when (job) {
is RpcSendJob.Send -> handleSendJob(deduplicationSequenceNumber++, job)
RpcSendJob.Stop -> return@thread