You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2023/04/18 16:12:37 UTC
[plc4x] branch develop updated: fux(plc4go/cbus): fix timer cleanup too early
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new f303898430 fux(plc4go/cbus): fix timer cleanup too early
f303898430 is described below
commit f303898430ff6c33ee3235b3ecb373dc47fb4272
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Apr 18 18:11:14 2023 +0200
fux(plc4go/cbus): fix timer cleanup too early
---
plc4go/internal/cbus/Discoverer.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plc4go/internal/cbus/Discoverer.go b/plc4go/internal/cbus/Discoverer.go
index 403c9894fb..0aff7caa29 100644
--- a/plc4go/internal/cbus/Discoverer.go
+++ b/plc4go/internal/cbus/Discoverer.go
@@ -190,7 +190,7 @@ func (d *Discoverer) createDeviceScanDispatcher(tcpTransportInstance *tcp.Transp
// Keep on reading responses till the timeout is done.
// TODO: Make this configurable
timeout := time.NewTimer(time.Second * 1)
- utils.CleanupTimer(timeout)
+ defer utils.CleanupTimer(timeout)
timeout.Stop()
for start := time.Now(); time.Since(start) < time.Second*5; {
timeout.Reset(time.Second * 1)