Skip to content

Commit e5ea748

Browse files
yorickdewidakien-mga
authored andcommitted
FIX: Return if TCP is in STATUS_CONNECTED
If the `StreamPeerTCP` is polled and the TCP connection is `STATUS_CONNECTED` it should return after polling netsocket. Without `return` poll keeps calling `_sock->connect_to_host` and `connect()`. (cherry picked from commit 61a2f5c)
1 parent 895f187 commit e5ea748

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ branches, and linked at the [end of this file](#Past-releases).
218218
- Doc: Clarify some details about deferred calls ([GH-88961](https://github.com/godotengine/godot/pull/88961)).
219219
- [C#] Fix typo in `Color` documentation ([GH-89092](https://github.com/godotengine/godot/pull/89092)).
220220
- Address a few issues in Transform3D documentation ([GH-89147](https://github.com/godotengine/godot/pull/89147)).
221-
- Docs: C#] Use `PropertyName` constants in more places ([GH-89246](https://github.com/godotengine/godot/pull/89246)).
221+
- Docs: [C#] Use `PropertyName` constants in more places ([GH-89246](https://github.com/godotengine/godot/pull/89246)).
222222
- Doc: Clarify `bsearch(_custom)` behavior ([GH-89280](https://github.com/godotengine/godot/pull/89280)).
223223
- Doc: Clarify description for `get_unix_time_from_system` on UTC ([GH-89454](https://github.com/godotengine/godot/pull/89454)).
224224
- Doc: Clarify behavior of `String.format` with keys in replacements ([GH-89608](https://github.com/godotengine/godot/pull/89608)).
@@ -375,6 +375,7 @@ branches, and linked at the [end of this file](#Past-releases).
375375
#### Network
376376

377377
- enet: Sync with upstream commit c44b7d0 ([GH-90244](https://github.com/godotengine/godot/pull/90244)).
378+
- Fix missing return in `StreamPeerTCP::poll` when connection is `STATUS_CONNECTED` ([GH-90471](https://github.com/godotengine/godot/pull/90741)).
378379

379380
#### Particles
380381

core/io/stream_peer_tcp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
5151
status = STATUS_ERROR;
5252
return err;
5353
}
54+
return OK;
5455
} else if (status != STATUS_CONNECTING) {
5556
return OK;
5657
}

0 commit comments

Comments
 (0)