浏览代码

Merge pull request #15294 from poke1024/fix-debug-hangs

Fix Godot getting swamped by debug events
Rémi Verschelde 7 年之前
父节点
当前提交
0df857f9f2
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      editor/script_editor_debugger.cpp

+ 5 - 0
editor/script_editor_debugger.cpp

@@ -1053,6 +1053,8 @@ void ScriptEditorDebugger::_notification(int p_what) {
 				break;
 				break;
 			};
 			};
 
 
+			const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20;
+
 			while (ppeer->get_available_packet_count() > 0) {
 			while (ppeer->get_available_packet_count() > 0) {
 
 
 				if (pending_in_queue) {
 				if (pending_in_queue) {
@@ -1117,6 +1119,9 @@ void ScriptEditorDebugger::_notification(int p_what) {
 						break;
 						break;
 					}
 					}
 				}
 				}
+
+				if (OS::get_singleton()->get_ticks_msec() > until)
+					break;
 			}
 			}
 
 
 		} break;
 		} break;