update credits even without a sink

This commit is contained in:
Gilles Boccon-Gibod
2024-01-09 17:58:52 -08:00
parent d8e6700611
commit 481cf40831
5 changed files with 40 additions and 5 deletions

View File

@@ -538,8 +538,9 @@ class DLC(EventEmitter):
f'[{self.dlci}] {len(data)} bytes, '
f'rx_credits={self.rx_credits}: {data.hex()}'
)
if len(data) and self.sink:
self.sink(data) # pylint: disable=not-callable
if len(data):
if self.sink:
self.sink(data) # pylint: disable=not-callable
# Update the credits
if self.rx_credits > 0: