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 2022/08/29 13:27:20 UTC

[plc4x] 02/02: fix(plc4go/cbus): fixed empty responses on read

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

commit c38f164aca14e0bb96647b55a83d8d857156dcad
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Aug 29 15:27:07 2022 +0200

    fix(plc4go/cbus): fixed empty responses on read
---
 plc4go/internal/cbus/Reader.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plc4go/internal/cbus/Reader.go b/plc4go/internal/cbus/Reader.go
index b2949dab2..3eaf2f9b8 100644
--- a/plc4go/internal/cbus/Reader.go
+++ b/plc4go/internal/cbus/Reader.go
@@ -388,6 +388,9 @@ func (m *Reader) Read(ctx context.Context, readRequest apiModel.PlcReadRequest)
 					_ = transaction.EndRequest()
 				}
 			})
+			if err := transaction.AwaitCompletion(); err != nil {
+				addResponseCode(fieldName, apiModel.PlcResponseCode_INTERNAL_ERROR)
+			}
 		}
 		readResponse := spiModel.NewDefaultPlcReadResponse(readRequest, responseCodes, plcValues)
 		result <- &spiModel.DefaultPlcReadRequestResult{