File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ final public class sACNSource {
322322 if existingInterfaces. isEmpty {
323323 // not possible for IPv6
324324
325- if universes. isEmpty {
325+ if universes. isEmpty || !_isListening {
326326 // deinit first stops listening
327327 sockets. removeAll ( )
328328 } else {
@@ -350,7 +350,7 @@ final public class sACNSource {
350350 } else if newInterfaces. isEmpty {
351351 // not possible for IPv6
352352
353- if universes. isEmpty {
353+ if universes. isEmpty || !_isListening {
354354 // deinit first stops listening
355355 sockets. removeAll ( )
356356 } else {
@@ -380,7 +380,7 @@ final public class sACNSource {
380380 // terminate all universes on sockets no longer needed, removing the sockets but not the universes
381381 let socketsToRemove = sockets. filter { interfacesToRemove. contains ( $0. key) }
382382 if !socketsToRemove. isEmpty {
383- if universes. isEmpty {
383+ if universes. isEmpty || !_isListening {
384384 for socketToRemove in socketsToRemove. keys {
385385 // deinit first stops listening
386386 sockets. removeValue ( forKey: socketToRemove)
You can’t perform that action at this time.
0 commit comments