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/09/01 15:48:48 UTC
[plc4x] branch develop updated: fix(plc4go): fixed subscriber trying to add to a nil map
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 185508292 fix(plc4go): fixed subscriber trying to add to a nil map
185508292 is described below
commit 185508292c17666df6fe55e65dcda5889e5579f7
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Sep 1 17:48:40 2022 +0200
fix(plc4go): fixed subscriber trying to add to a nil map
---
plc4go/spi/model/DefaultPlcSubscriptionRequest.go | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/plc4go/spi/model/DefaultPlcSubscriptionRequest.go b/plc4go/spi/model/DefaultPlcSubscriptionRequest.go
index 2e025eb4c..2cea374fa 100644
--- a/plc4go/spi/model/DefaultPlcSubscriptionRequest.go
+++ b/plc4go/spi/model/DefaultPlcSubscriptionRequest.go
@@ -51,14 +51,15 @@ type DefaultPlcSubscriptionRequestBuilder struct {
func NewDefaultPlcSubscriptionRequestBuilder(fieldHandler spi.PlcFieldHandler, valueHandler spi.PlcValueHandler, subscriber spi.PlcSubscriber) *DefaultPlcSubscriptionRequestBuilder {
return &DefaultPlcSubscriptionRequestBuilder{
- subscriber: subscriber,
- fieldHandler: fieldHandler,
- valueHandler: valueHandler,
- queries: map[string]string{},
- fields: map[string]model.PlcField{},
- fieldNames: make([]string, 0),
- types: map[string]SubscriptionType{},
- intervals: map[string]time.Duration{},
+ subscriber: subscriber,
+ fieldHandler: fieldHandler,
+ valueHandler: valueHandler,
+ queries: map[string]string{},
+ fields: map[string]model.PlcField{},
+ fieldNames: make([]string, 0),
+ types: map[string]SubscriptionType{},
+ intervals: map[string]time.Duration{},
+ preRegisteredConsumers: make(map[string][]model.PlcSubscriptionEventConsumer),
}
}