mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Merge pull request #29463 from Faless/editor/debugger_take_connection
Editor debugger now always handle connections.
This commit is contained in:
commit
7fa941bfd8
1 changed files with 11 additions and 9 deletions
|
@ -1121,10 +1121,13 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
last_warning_count = warning_count;
|
||||
}
|
||||
|
||||
if (connection.is_null()) {
|
||||
|
||||
if (server->is_connection_available()) {
|
||||
|
||||
if (server->is_connection_available()) {
|
||||
if (connection.is_valid()) {
|
||||
// We already have a valid connection. Disconnecting any new connecting client to prevent it from hanging.
|
||||
// (If we don't keep a reference to the connection it will be destroyed and disconnect_from_host will be called internally)
|
||||
server->take_connection();
|
||||
} else {
|
||||
// We just got the first connection.
|
||||
connection = server->take_connection();
|
||||
if (connection.is_null())
|
||||
break;
|
||||
|
@ -1158,12 +1161,11 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
if (profiler->is_profiling()) {
|
||||
_profiler_activate(true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (connection.is_null())
|
||||
break;
|
||||
|
||||
if (!connection->is_connected_to_host()) {
|
||||
stop();
|
||||
|
|
Loading…
Add table
Reference in a new issue