Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: notifying manager when an acknowledged mesh message fails to be sent to a multicast address #600

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions nRFMeshProvision/Layers/Access Layer/AccessLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ internal class AccessLayer {

// Set timers for the acknowledged messages.
// Acknowledged messages sent to a Group address won't await a Status.
if message is AcknowledgedMeshMessage,
destination.address.isUnicast {
if message.isAcknowledged, destination.address.isUnicast {
createReliableContext(for: pdu, sentFrom: element, withTtl: initialTtl, using: keySet)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ internal class LowerTransportLayer {
from: localElement, to: pdu.destination)
} catch {
logger?.w(.lowerTransport, error)
if !pdu.message!.isAcknowledged {
if pdu.message!.isAcknowledged && pdu.destination.address.isUnicast {
// Acknowledged messages sent to a Unicast Address will be retransmitted
// by the Access Layer. Nothing to be done here.
// See: https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/issues/599
} else {
//
networkManager.notifyAbout(error: error, duringSendingMessage: pdu.message!,
from: localElement, to: pdu.destination)
}
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Layers/NetworkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ internal class NetworkManager {
// If retransmission was configured, start the timer that will retransmit.
// There is no need to retransmit acknowledged messages, as they have their
// own retransmission mechanism.
if !(message is AcknowledgedMeshMessage) {
if !message.isAcknowledged {
var count = publish.retransmit.count
if count > 0 {
let interval: TimeInterval = Double(publish.retransmit.interval) / 1000
Expand Down