You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/03/31 09:44:41 UTC
[plc4x] branch develop updated: fix(plc4go/codegen): Truly close connection (#338)
This is an automated email from the ASF dual-hosted git repository.
cdutz 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 5cda65f fix(plc4go/codegen): Truly close connection (#338)
5cda65f is described below
commit 5cda65ff3a78791d521cc90b86d4e3b5ecd4f2ee
Author: hongjinlin <89...@qq.com>
AuthorDate: Thu Mar 31 17:44:36 2022 +0800
fix(plc4go/codegen): Truly close connection (#338)
---
plc4go/internal/plc4go/spi/default/DefaultConnection.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plc4go/internal/plc4go/spi/default/DefaultConnection.go b/plc4go/internal/plc4go/spi/default/DefaultConnection.go
index ddf9579..029d1c6 100644
--- a/plc4go/internal/plc4go/spi/default/DefaultConnection.go
+++ b/plc4go/internal/plc4go/spi/default/DefaultConnection.go
@@ -255,10 +255,11 @@ func (d *defaultConnection) BlockingClose() {
func (d *defaultConnection) Close() <-chan plc4go.PlcConnectionCloseResult {
log.Trace().Msg("close connection")
+ err := d.GetTransportInstance().Close()
d.SetConnected(false)
ch := make(chan plc4go.PlcConnectionCloseResult)
go func() {
- ch <- NewDefaultPlcConnectionCloseResult(d.GetConnection(), nil)
+ ch <- NewDefaultPlcConnectionCloseResult(d.GetConnection(), err)
}()
return ch
}