Closed hanxiao34 closed 2 years ago
Hi!
Thanks for the notification. Indeed, wasn't really paying attention to potential concurrent writes.
I have handled a quick fix using a synchronized list as the only concurrent issues we might have should happen between the two single threaded executors in the code.
As for the automatic lookup, makes sense. I've added a new SsdpClientOptions attribute called lookupAllIncomingAnnouncements
. Default value is true for retrocompatibility.
By using the Options builder method disableAutoLookup()
, you will be able to have the expected behaviour.
Ships in 2.4.5 :)
Feel free to close the issue when acknowledged ;)
In fact, I have encountered this concurrency problem. Thank you for solving it.
requests during loop execution add may be executed, causing requests to be changed.
In addition, I don't understand why I want to add request in handlepresenceannouncement, which may change the purpose of my program