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
7b4ae7bd
Commit
7b4ae7bd
authored
Feb 09, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a2ce1f4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
go/neo/client/client.go
go/neo/client/client.go
+5
-1
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+2
-1
No files found.
go/neo/client/client.go
View file @
7b4ae7bd
...
...
@@ -84,7 +84,7 @@ func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
}
// spawn background process which performs master talk
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
// XXX bg hardcoded
cli
.
talkMasterCancel
=
cancel
cli
.
node
.
OnShutdown
=
cancel
// XXX ok?
go
cli
.
talkMaster
(
ctx
)
...
...
@@ -170,6 +170,7 @@ func (c *Client) updateOperational() (sendReady func()) {
// unlocked otherwise.
//
// The only error possible is if provided ctx cancel.
// XXX and client stopped/closed? (ctx passed to Run cancelled)
func
(
c
*
Client
)
withOperational
(
ctx
context
.
Context
)
error
{
for
{
c
.
node
.
StateMu
.
RLock
()
...
...
@@ -186,6 +187,9 @@ func (c *Client) withOperational(ctx context.Context) error {
case
<-
ctx
.
Done
()
:
return
ctx
.
Err
()
// XXX case <-c.runctx.Done():
// return "op on closed client ..." ?
case
<-
ready
:
// ok - try to relock and read again.
}
...
...
go/neo/server/cluster_test.go
View file @
7b4ae7bd
...
...
@@ -617,7 +617,8 @@ func TestMasterStorage(t *testing.T) {
// ----------------------------------------
// XXX try creating clint from the beginning
// XXX try creating client from the beginning
return
// XXX temp
// create client
C
:=
client
.
NewClient
(
"abc1"
,
"m:1"
,
Chost
)
...
...
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