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
8d59cba0
Commit
8d59cba0
authored
Jun 27, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ssl' of github.com:zopefoundation/ZEO into ssl
parents
5fcd383e
daca97cb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+1
-1
src/ZEO/asyncio/mtacceptor.py
src/ZEO/asyncio/mtacceptor.py
+20
-10
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+1
-1
No files found.
src/ZEO/StorageServer.py
View file @
8d59cba0
...
...
@@ -50,7 +50,7 @@ from ZODB.POSException import TransactionError, ReadOnlyError, ConflictError
from
ZODB.serialize
import
referencesf
from
ZODB.utils
import
oid_repr
,
p64
,
u64
,
z64
from
.asyncio.
serve
r
import
Acceptor
from
.asyncio.
mtaccepto
r
import
Acceptor
logger
=
logging
.
getLogger
(
'ZEO.StorageServer'
)
...
...
src/ZEO/asyncio/mtacceptor.py
View file @
8d59cba0
...
...
@@ -81,13 +81,8 @@ class Acceptor(asyncore.dispatcher):
asyncore
.
dispatcher
.
__init__
(
self
,
map
=
self
.
__socket_map
)
self
.
ssl_context
=
ssl
if
ssl
is
not
None
:
self
.
ssl_wrap_socket
=
ssl
.
wrap_socket
self
.
_open_socket
()
def
ssl_wrap_socket
(
self
,
sock
,
server_side
):
return
sock
def
_open_socket
(
self
):
addr
=
self
.
addr
...
...
@@ -165,17 +160,32 @@ class Acceptor(asyncore.dispatcher):
try
:
logger
.
debug
(
"new connection %s"
%
(
addr
,))
sock
=
self
.
ssl_wrap_socket
(
sock
,
server_side
=
True
)
def
run
():
loop
=
asyncio
.
new_event_loop
()
asyncio
.
set_event_loop
(
loop
)
zs
=
self
.
storage_server
.
create_client_handler
()
protocol
=
ServerProtocol
(
loop
,
self
.
addr
,
zs
)
protocol
.
stop
=
loop
.
stop
asyncio
.
async
(
loop
.
create_connection
((
lambda
:
protocol
),
sock
=
sock
),
loop
=
loop
)
if
self
.
ssl_context
is
None
:
cr
=
loop
.
create_connection
((
lambda
:
protocol
),
sock
=
sock
)
else
:
#######################################################
# XXX See http://bugs.python.org/issue27392 :(
_make_ssl_transport
=
loop
.
_make_ssl_transport
def
make_ssl_transport
(
*
a
,
**
kw
):
kw
[
'server_side'
]
=
True
return
_make_ssl_transport
(
*
a
,
**
kw
)
loop
.
_make_ssl_transport
=
make_ssl_transport
#
#######################################################
cr
=
loop
.
create_connection
(
(
lambda
:
protocol
),
sock
=
sock
,
ssl
=
self
.
ssl_context
,
server_hostname
=
'fu'
# http://bugs.python.org/issue27391
)
asyncio
.
async
(
cr
,
loop
=
loop
)
loop
.
run_forever
()
loop
.
close
()
...
...
src/ZEO/tests/testZEO.py
View file @
8d59cba0
...
...
@@ -1089,7 +1089,7 @@ def runzeo_without_configfile():
------
--T INFO ZEO.StorageServer StorageServer created RW with storages 1RWt
------
--T INFO ZEO.asyncio.
server
listening on ...
--T INFO ZEO.asyncio.
..
listening on ...
------
--T INFO ZEO.StorageServer closing storage '1'
testing exit immediately
...
...
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