Skip to content
Snippets Groups Projects
Commit 0a667fb9 authored by Adrien Béraud's avatar Adrien Béraud Committed by Philippe Gorley
Browse files

bin: remove any remaining pollEvents call


Change-Id: I848f8c7e5af8bd224c49de8a829475a99993abdc
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
Gitlab: #52
parent 79277225
Branches
No related tags found
No related merge requests found
...@@ -26,10 +26,6 @@ class RingDaemon{ ...@@ -26,10 +26,6 @@ class RingDaemon{
this.dring = require("./build/Release/dring.node"); this.dring = require("./build/Release/dring.node");
this.dring.init(callbackMap); this.dring.init(callbackMap);
var that = this; var that = this;
this.pollIntervalId = setInterval(function () {
that.dring.pollEvents();
//console.log("Polling...");
}, 10);
} }
} }
...@@ -113,7 +109,6 @@ class RingDaemon{ ...@@ -113,7 +109,6 @@ class RingDaemon{
} }
stop() { stop() {
clearInterval(this.pollIntervalId);
this.dring.fini(); this.dring.fini();
} }
} }
......
...@@ -31,9 +31,4 @@ namespace DRing { ...@@ -31,9 +31,4 @@ namespace DRing {
*/ */
void fini(void); void fini(void);
/**
* Poll for events
*/
void pollEvents(void);
} }
...@@ -56,8 +56,7 @@ RestClient::event_loop() noexcept ...@@ -56,8 +56,7 @@ RestClient::event_loop() noexcept
RING_INFO("Restclient starting to poll events"); RING_INFO("Restclient starting to poll events");
while(!pollNoMore_) while(!pollNoMore_)
{ {
DRing::pollEvents(); std::this_thread::sleep_for(std::chrono::milliseconds(50));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
} }
return 0; return 0;
} }
......
...@@ -79,10 +79,4 @@ fini() noexcept ...@@ -79,10 +79,4 @@ fini() noexcept
ring::Manager::instance().finish(); ring::Manager::instance().finish();
} }
void
pollEvents() noexcept
{
ring::Manager::instance().pollEvents();
}
} // namespace DRing } // namespace DRing
...@@ -106,8 +106,7 @@ test_SIP::setUp() ...@@ -106,8 +106,7 @@ test_SIP::setUp()
running_ = true; running_ = true;
eventLoop_ = RAIIThread(std::thread([this]{ eventLoop_ = RAIIThread(std::thread([this]{
while (running_) { while (running_) {
Manager::instance().pollEvents(); std::this_thread::sleep_for(std::chrono::milliseconds(50));
std::this_thread::sleep_for(std::chrono::milliseconds(10));
} }
})); }));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment