Skip to content

Event-based discovery START_SYNC is actually polling-based #5

Closed
@cmaglie

Description

@cmaglie

As it seems from the START_SYNC implementation:

        std::thread([&] {
          j["message"] = "OK";
          std::cout << j.dump(2) << std::endl;
          while (state != QUIT) {
            if (state == START_SYNC) {
              probe_devices(ctx);
              print_event();
            }
            std::this_thread::sleep_for(std::chrono::seconds(5));
          }
        }).detach();

It does a poll every 5 seconds, this means that events may be delayed up to 5 seconds.
Also, polling is not ideal for discoveries, we must find a way to make it event-based to deliver events in real time like all other discoveries.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions