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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
=========
4.2.1 (unreleased)
------------------
- Fix bug connecting to ``localhost`` on Windows. (#8).
4.2.0 (2016-06-15)
------------------
...
...
src/ZEO/zrpc/client.py
View file @
90d15055
...
...
@@ -452,12 +452,10 @@ class ConnectThread(threading.Thread):
if
domain
==
socket
.
AF_INET
:
host
,
port
=
addr
for
(
family
,
socktype
,
proto
,
cannoname
,
sockaddr
)
in
socket
.
getaddrinfo
(
host
or
'localhost'
,
port
):
# we only speak TCP, so let's skip UDP and RAW sockets
# otherwise we'll try to connect to the same address
# three times in a row
if
socktype
!=
socket
.
SOCK_STREAM
:
continue
)
in
socket
.
getaddrinfo
(
host
or
'localhost'
,
port
,
socket
.
AF_INET
,
socket
.
SOCK_STREAM
):
# prune non-TCP results
# for IPv6, drop flowinfo, and restrict addresses
# to [host]:port
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