Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
97757cd1
Commit
97757cd1
authored
Aug 28, 2018
by
Fabio Alessandrelli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DNS resolution when cache is invalid.
Fix StreamPeerTCP.connect_to_host return value.
parent
6671096d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
ip.cpp
core/io/ip.cpp
+2
-2
stream_peer_tcp.cpp
core/io/stream_peer_tcp.cpp
+1
-2
No files found.
core/io/ip.cpp
View file @
97757cd1
...
...
@@ -117,7 +117,7 @@ IP_Address IP::resolve_hostname(const String &p_hostname, IP::Type p_type) {
resolver
->
mutex
->
lock
();
String
key
=
_IP_ResolverPrivate
::
get_cache_key
(
p_hostname
,
p_type
);
if
(
resolver
->
cache
.
has
(
key
))
{
if
(
resolver
->
cache
.
has
(
key
)
&&
resolver
->
cache
[
key
].
is_valid
()
)
{
IP_Address
res
=
resolver
->
cache
[
key
];
resolver
->
mutex
->
unlock
();
return
res
;
...
...
@@ -144,7 +144,7 @@ IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Typ
String
key
=
_IP_ResolverPrivate
::
get_cache_key
(
p_hostname
,
p_type
);
resolver
->
queue
[
id
].
hostname
=
p_hostname
;
resolver
->
queue
[
id
].
type
=
p_type
;
if
(
resolver
->
cache
.
has
(
key
))
{
if
(
resolver
->
cache
.
has
(
key
)
&&
resolver
->
cache
[
key
].
is_valid
()
)
{
resolver
->
queue
[
id
].
response
=
resolver
->
cache
[
key
];
resolver
->
queue
[
id
].
status
=
IP
::
RESOLVER_STATUS_DONE
;
}
else
{
...
...
core/io/stream_peer_tcp.cpp
View file @
97757cd1
...
...
@@ -43,8 +43,7 @@ Error StreamPeerTCP::_connect(const String &p_address, int p_port) {
return
ERR_CANT_RESOLVE
;
}
connect_to_host
(
ip
,
p_port
);
return
OK
;
return
connect_to_host
(
ip
,
p_port
);
}
void
StreamPeerTCP
::
_bind_methods
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment