Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
bbdcf0b0
Commit
bbdcf0b0
authored
Jul 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c09a1bc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+1
-1
go/zodb/storage/zeo/zrpc.go
go/zodb/storage/zeo/zrpc.go
+8
-2
No files found.
go/zodb/storage/zeo/zeo.go
View file @
bbdcf0b0
...
...
@@ -468,7 +468,7 @@ func openByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (_ zodb
func
(
z
*
zeo
)
Close
()
error
{
err
:=
z
.
link
.
Close
()
if
z
.
watchq
!=
nil
{
if
z
.
watchq
!=
nil
{
// XXX -> into zlink.shutdown instead? (so it is closed after link is closed)?
close
(
z
.
watchq
)
}
return
err
...
...
go/zodb/storage/zeo/zrpc.go
View file @
bbdcf0b0
...
...
@@ -72,8 +72,8 @@ type zLink struct {
serveCtx
context
.
Context
// serveTab handlers are called with this ctx
serveCancel
func
()
// to cancel serveCtx
down1
sync
.
Once
errClose
error
// error got from .link.Close()
down1
sync
.
Once
errClose
error
// error got from .link.Close()
ver
string
// protocol version in use (without "Z" or "M" prefix)
enc
encoding
// protocol encoding in use ('Z' or 'M')
...
...
@@ -87,6 +87,11 @@ func (zl *zLink) start() {
go
zl
.
serveRecv
()
}
// StartServe starts serving calls from remote peer according to notifyTab and serveTab.
//
// XXX it would be better for zLink to instead provide .Recv() to receive
// peer's requests and then serve is just loop over Recv and decide what to do
// with messages.
func
(
zl
*
zLink
)
StartServe
(
notifyTab
map
[
string
]
func
(
interface
{})
error
,
serveTab
map
[
string
]
func
(
context
.
Context
,
interface
{})
interface
{},
...
...
@@ -119,6 +124,7 @@ func (zl *zLink) shutdown(err error) {
rxc
<-
msg
{
arg
:
nil
}
// notify link was closed XXX ok? or err explicitly?
}
// XXX if err != nil -> watchq <- zodb.EventError{err}
// XXX close watcher
})
}
...
...
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