Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
90d15055
Commit
90d15055
authored
Jun 24, 2016
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix connecting to 'localhost' on Windows / Solaris / Android.
Closes #8. Closes #30.
parent
1bd6bd93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
CHANGES.rst
CHANGES.rst
+5
-0
src/ZEO/zrpc/client.py
src/ZEO/zrpc/client.py
+4
-6
No files found.
CHANGES.rst
View file @
90d15055
Changelog
Changelog
=========
=========
4.2.1 (unreleased)
------------------
- Fix bug connecting to ``localhost`` on Windows. (#8).
4.2.0 (2016-06-15)
4.2.0 (2016-06-15)
------------------
------------------
...
...
src/ZEO/zrpc/client.py
View file @
90d15055
...
@@ -452,12 +452,10 @@ class ConnectThread(threading.Thread):
...
@@ -452,12 +452,10 @@ class ConnectThread(threading.Thread):
if
domain
==
socket
.
AF_INET
:
if
domain
==
socket
.
AF_INET
:
host
,
port
=
addr
host
,
port
=
addr
for
(
family
,
socktype
,
proto
,
cannoname
,
sockaddr
for
(
family
,
socktype
,
proto
,
cannoname
,
sockaddr
)
in
socket
.
getaddrinfo
(
host
or
'localhost'
,
port
):
)
in
socket
.
getaddrinfo
(
host
or
'localhost'
,
port
,
# we only speak TCP, so let's skip UDP and RAW sockets
socket
.
AF_INET
,
# otherwise we'll try to connect to the same address
socket
.
SOCK_STREAM
# three times in a row
):
# prune non-TCP results
if
socktype
!=
socket
.
SOCK_STREAM
:
continue
# for IPv6, drop flowinfo, and restrict addresses
# for IPv6, drop flowinfo, and restrict addresses
# to [host]:port
# to [host]:port
yield
family
,
sockaddr
[:
2
]
yield
family
,
sockaddr
[:
2
]
...
...
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