diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-01-08 15:36:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-08 15:36:59 +0100 |
commit | 0df857f9f2f0666f3441713c65bd7667fbb67fc5 (patch) | |
tree | f0870df9b64b7acbda328bf4e004c9384fb9af74 | |
parent | 1fea0adc5c3f250b585c89f56e6fd0e07ba61f83 (diff) | |
parent | bd5e3052aca8495f04552b81b2a03917f9387717 (diff) |
Merge pull request #15294 from poke1024/fix-debug-hangs
Fix Godot getting swamped by debug events
-rw-r--r-- | editor/script_editor_debugger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index e993c2fd46..cbf2687d73 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -1053,6 +1053,8 @@ void ScriptEditorDebugger::_notification(int p_what) { break; }; + const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20; + while (ppeer->get_available_packet_count() > 0) { if (pending_in_queue) { @@ -1117,6 +1119,9 @@ void ScriptEditorDebugger::_notification(int p_what) { break; } } + + if (OS::get_singleton()->get_ticks_msec() > until) + break; } } break; |