Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
fb3dcb0d
Commit
fb3dcb0d
authored
Sep 11, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X stor shutdown hackily works
parent
533d3a3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
go/neo/server/storage.go
go/neo/server/storage.go
+10
-2
No files found.
go/neo/server/storage.go
View file @
fb3dcb0d
...
...
@@ -94,7 +94,14 @@ func (stor *Storage) Run(ctx context.Context) error {
// start serving incoming connections
wg
:=
sync
.
WaitGroup
{}
serveCtx
,
serveCancel
:=
context
.
WithCancel
(
ctx
)
stor
.
node
.
OnShutdown
=
serveCancel
//stor.node.OnShutdown = serveCancel
// XXX hack: until ctx cancel is not handled properly by Recv/Send
stor
.
node
.
OnShutdown
=
func
()
{
serveCancel
()
lclose
(
ctx
,
l
)
}
wg
.
Add
(
1
)
go
func
(
ctx
context
.
Context
)
(
err
error
)
{
defer
wg
.
Done
()
...
...
@@ -133,7 +140,8 @@ func (stor *Storage) Run(ctx context.Context) error {
}(
serveCtx
)
// connect to master and get commands and updates from it
err
=
stor
.
talkMaster
(
ctx
)
//err = stor.talkMaster(ctx)
err
=
stor
.
talkMaster
(
serveCtx
)
// XXX hack for shutdown
// XXX log err?
// we are done - shutdown
...
...
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