mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Merge pull request #32228 from damianday/patch-1
TCP is_connected_to_host comparison error
This commit is contained in:
commit
dcf0a60a52
@ -248,16 +248,7 @@ void StreamPeerTCP::set_no_delay(bool p_enabled) {
|
|||||||
|
|
||||||
bool StreamPeerTCP::is_connected_to_host() const {
|
bool StreamPeerTCP::is_connected_to_host() const {
|
||||||
|
|
||||||
if (status == STATUS_NONE || status == STATUS_ERROR) {
|
return _sock.is_valid() && _sock->is_open() && (status == STATUS_CONNECTED || status == STATUS_CONNECTING);
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status != STATUS_CONNECTED) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _sock.is_valid() && _sock->is_open();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamPeerTCP::Status StreamPeerTCP::get_status() {
|
StreamPeerTCP::Status StreamPeerTCP::get_status() {
|
||||||
|
Loading…
Reference in New Issue
Block a user