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
Show 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
...
@@ -468,7 +468,7 @@ func openByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (_ zodb
func
(
z
*
zeo
)
Close
()
error
{
func
(
z
*
zeo
)
Close
()
error
{
err
:=
z
.
link
.
Close
()
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
)
close
(
z
.
watchq
)
}
}
return
err
return
err
...
...
go/zodb/storage/zeo/zrpc.go
View file @
bbdcf0b0
...
@@ -87,6 +87,11 @@ func (zl *zLink) start() {
...
@@ -87,6 +87,11 @@ func (zl *zLink) start() {
go
zl
.
serveRecv
()
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
(
func
(
zl
*
zLink
)
StartServe
(
notifyTab
map
[
string
]
func
(
interface
{})
error
,
notifyTab
map
[
string
]
func
(
interface
{})
error
,
serveTab
map
[
string
]
func
(
context
.
Context
,
interface
{})
interface
{},
serveTab
map
[
string
]
func
(
context
.
Context
,
interface
{})
interface
{},
...
@@ -119,6 +124,7 @@ func (zl *zLink) shutdown(err error) {
...
@@ -119,6 +124,7 @@ func (zl *zLink) shutdown(err error) {
rxc
<-
msg
{
arg
:
nil
}
// notify link was closed XXX ok? or err explicitly?
rxc
<-
msg
{
arg
:
nil
}
// notify link was closed XXX ok? or err explicitly?
}
}
// XXX if err != nil -> watchq <- zodb.EventError{err}
// XXX close watcher
// 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