diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index b9fa087b8e..24852d758f 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -4350,11 +4350,16 @@ void DeviceManager::keep_alive() obj->keep_alive_count++; std::chrono::system_clock::time_point start = std::chrono::system_clock::now(); auto internal = std::chrono::duration_cast(start - obj->last_keep_alive); - if (internal.count() > TIMEOUT_FOR_KEEPALIVE && internal.count() < 1000 * 60 * 60 * 300) { + if (internal.count() > TIMEOUT_FOR_KEEPALIVE && (internal.count() < 1000 * 60 * 60 * 300) ) { BOOST_LOG_TRIVIAL(info) << "keep alive = " << internal.count() << ", count = " << obj->keep_alive_count; obj->command_request_push_all(); obj->last_keep_alive = start; } + else if(obj->m_push_count == 0){ + BOOST_LOG_TRIVIAL(info) << "keep alive = " << internal.count() << ", push_count = 0, count = " << obj->keep_alive_count; + obj->command_request_push_all(); + obj->last_keep_alive = start; + } } } diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index e6802b09ab..300099d846 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -20,7 +20,7 @@ #define PUSHINFO_TIMEOUT 15000.f // milliseconds #define TIMEOUT_FOR_STRAT 20000.f // milliseconds #define TIMEOUT_FOR_KEEPALIVE 5* 60 * 1000.f // milliseconds -#define REQUEST_PUSH_MIN_TIME 15000.f // milliseconds +#define REQUEST_PUSH_MIN_TIME 3000.f // milliseconds #define REQUEST_START_MIN_TIME 15000.f // milliseconds #define EXTRUSION_OMIT_TIME 20000.f // milliseconds #define HOLD_TIMEOUT 10000.f // milliseconds