File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,7 @@ public class sACNDiscoveryReceiver {
306306
307307 /// Stops the main heartbeat timer.
308308 private func stopHeartbeat( ) {
309+ heartbeatTimer? . cancel ( )
309310 heartbeatTimer = nil
310311 }
311312
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ public class sACNReceiverRaw {
237237 guard _isListening else { return }
238238 self . _isListening = false
239239
240+ sampleTimer? . cancel ( )
240241 sampleTimer = nil
241242 stopHeartbeat ( )
242243
@@ -390,6 +391,7 @@ public class sACNReceiverRaw {
390391
391392 /// Stops the main heartbeat timer.
392393 private func stopHeartbeat( ) {
394+ heartbeatTimer? . cancel ( )
393395 heartbeatTimer = nil
394396 }
395397
@@ -437,6 +439,7 @@ public class sACNReceiverRaw {
437439
438440 self . beginSamplingPeriod ( notify: false )
439441 } else {
442+ self . sampleTimer? . cancel ( )
440443 self . sampleTimer = nil
441444
442445 // notify sampling has ended
Original file line number Diff line number Diff line change @@ -547,7 +547,10 @@ final public class sACNSource {
547547
548548 /// Stops this source's universe discovery heartbeat.
549549 private func stopUniverseDiscovery( ) {
550- timerQueue. sync { universeDiscoveryTimer = nil }
550+ timerQueue. sync {
551+ universeDiscoveryTimer? . cancel ( )
552+ universeDiscoveryTimer = nil
553+ }
551554 }
552555
553556 /// Starts this source's data transmission heartbeat.
@@ -666,7 +669,10 @@ private extension sACNSource {
666669 // termination of all universes to be removed is complete
667670 if self . shouldTerminate {
668671 // the source should terminate
669- timerQueue. sync { dataTransmitTimer = nil }
672+ timerQueue. sync {
673+ dataTransmitTimer? . cancel ( )
674+ dataTransmitTimer = nil
675+ }
670676
671677 sockets. forEach { _, socket in
672678 socket. stopListening ( )
You can’t perform that action at this time.
0 commit comments