diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index a6dfb5f..5317907 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -724,6 +724,11 @@ int main(int argc, char **argv) lastFocusedTimer.restart(); } + + for(Channel *channel : channels) + { + channel->update(); + } if(lastFocusedTimer.getElapsedTime().asMilliseconds() > 3000) { @@ -757,6 +762,15 @@ int main(int argc, char **argv) //video.draw(window); window.display(); } + + for(Channel *channel : channels) + { + channel->update(); + } + + // We need to wait until our `ping` packet for disconnecting is sent to all channels + printf("Shutting down..."); + this_thread::sleep_for(chrono::seconds(3)); return 0; } |