From 157518a9d6eb4ce204b55dd51e7cd840a0cb6949 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 9 Feb 2012 23:37:24 +0100 Subject: [PATCH] [BSC] Move the TX queue draining to a separate method This way we can replace the code from one function call to another. --- src/BSCIPAConnection.st | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/BSCIPAConnection.st b/src/BSCIPAConnection.st index 0c05b07..d25b219 100644 --- a/src/BSCIPAConnection.st +++ b/src/BSCIPAConnection.st @@ -141,10 +141,9 @@ BSCConnection subclass: BSCIPAConnection [ "Drain the send queue in a new process" tx := [ - [[ - | msg | - msg := writeQueue next. - socket nextPutAllFlush: msg. + [ + [ + self runTxQueueOnce ] repeat. ] ensure: [ self logNotice: 'BSC TX queue lac: %1 finished' % {self lac} area: #bsc] @@ -152,6 +151,14 @@ BSCConnection subclass: BSCIPAConnection [ ] + runTxQueueOnce [ + | msg | + + + msg := writeQueue next. + socket nextPutAllFlush: msg. + ] + send: aMsg with: aType [ terminated = true ifTrue: [^false].