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/03/21 15:58:08 UTC
[plc4x] branch develop updated: fix(plc4go/cbus): disconnect message codec on connection error
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 e4e92b0742 fix(plc4go/cbus): disconnect message codec on connection error
e4e92b0742 is described below
commit e4e92b07427b56ca8c9fc49d859d4eab02159a18
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Mar 21 16:57:59 2023 +0100
fix(plc4go/cbus): disconnect message codec on connection error
---
plc4go/internal/cbus/Connection.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plc4go/internal/cbus/Connection.go b/plc4go/internal/cbus/Connection.go
index 91380ca5e6..4afcd19648 100644
--- a/plc4go/internal/cbus/Connection.go
+++ b/plc4go/internal/cbus/Connection.go
@@ -455,6 +455,9 @@ func (c *Connection) fireConnectionError(err error, ch chan<- plc4go.PlcConnecti
} else {
log.Error().Err(err).Msg("awaitSetupComplete set to false and we got a error during connect")
}
+ if err := c.messageCodec.Disconnect(); err != nil {
+ log.Debug().Err(err).Msg("Error disconnecting message codec on connection error")
+ }
}
func (c *Connection) fireConnected(ch chan<- plc4go.PlcConnectionConnectResult) {