Skip to content

Commit

Permalink
fixed bug that was causing a manual read even though in susbcribe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTheocharis committed Jul 17, 2024
1 parent bdd267c commit 207b089
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion opcua_plugin/opcua.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,14 @@ func (g *OPCUAInput) ReadBatchSubscribe(ctx context.Context) (service.MessageBat
func (g *OPCUAInput) ReadBatch(ctx context.Context) (msgs service.MessageBatch, ackFunc service.AckFunc, err error) {
if g.SubscribeEnabled {
msgs, ackFunc, err = g.ReadBatchSubscribe(ctx)
} else {
msgs, ackFunc, err = g.ReadBatchPull(ctx)
}

if err != nil {
g.Log.Error("Received error in ReadBatch: " + err.Error())
return nil, nil, err
}
msgs, ackFunc, err = g.ReadBatchPull(ctx)

// Heartbeat logic
if g.UseHeartbeat {
Expand Down

0 comments on commit 207b089

Please sign in to comment.