mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Poll LSP/DAP clients for connection status updates
(cherry picked from commit 4be4eeea3a)
This commit is contained in:
parent
e7f7de0044
commit
b5ff677381
2 changed files with 2 additions and 0 deletions
|
|
@ -970,6 +970,7 @@ void DebugAdapterProtocol::poll() {
|
||||||
List<Ref<DAPeer>> to_delete;
|
List<Ref<DAPeer>> to_delete;
|
||||||
for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
|
for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) {
|
||||||
Ref<DAPeer> peer = E->get();
|
Ref<DAPeer> peer = E->get();
|
||||||
|
peer->connection->poll();
|
||||||
StreamPeerTCP::Status status = peer->connection->get_status();
|
StreamPeerTCP::Status status = peer->connection->get_status();
|
||||||
if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) {
|
if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) {
|
||||||
to_delete.push_back(peer);
|
to_delete.push_back(peer);
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,7 @@ void GDScriptLanguageProtocol::poll() {
|
||||||
HashMap<int, Ref<LSPeer>>::Iterator E = clients.begin();
|
HashMap<int, Ref<LSPeer>>::Iterator E = clients.begin();
|
||||||
while (E != clients.end()) {
|
while (E != clients.end()) {
|
||||||
Ref<LSPeer> peer = E->value;
|
Ref<LSPeer> peer = E->value;
|
||||||
|
peer->connection->poll();
|
||||||
StreamPeerTCP::Status status = peer->connection->get_status();
|
StreamPeerTCP::Status status = peer->connection->get_status();
|
||||||
if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) {
|
if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) {
|
||||||
on_client_disconnected(E->key);
|
on_client_disconnected(E->key);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue