resourcepool / ssdp-client

The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Apache License 2.0
52 stars 21 forks source link

Sometimes application wants to handle multiple responses on its own #32

Closed hanxiao34 closed 1 year ago

hanxiao34 commented 2 years ago

Sometimes an application wants to handle multiple responses on its own However, it is not allowed here. For the same device, only the first response will be notified to the user-defined listener

if (!cache.containsKey(ssdpService.getSerialNumber())) {
      callback.onServiceDiscovered(ssdpService);
    }
    cache.put(ssdpService.getSerialNumber(), ssdpService);
loicortola commented 2 years ago

Thanks, PR reviewed

loicortola commented 2 years ago

Hi @hanxiao34 , waiting for a quick fix on your PR before merging and releasing