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
48faf697
Commit
48faf697
authored
Jan 28, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
149be5e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
go/neo/client.go
go/neo/client.go
+11
-1
go/neo/mastered.go
go/neo/mastered.go
+12
-1
No files found.
go/neo/client.go
View file @
48faf697
...
...
@@ -368,8 +368,18 @@ func (c *Client) recvMaster(ctx context.Context) (err error) {
for
{
req
,
err
:=
c
.
node
.
RecvM1
()
if
err
!=
nil
{
return
err
// XXX eventReconnect
switch
{
// reconnected to master
case
errors
.
Is
(
err
,
eventMasterReconnect
)
:
c
.
head0
=
c
.
head
// XXX -> initFromMaster
default
:
return
err
}
continue
}
err
=
c
.
recvMaster1
(
req
.
Msg
)
req
.
Close
()
if
err
!=
nil
{
...
...
go/neo/mastered.go
View file @
48faf697
...
...
@@ -219,7 +219,16 @@ func (node *_MasteredNode) talkMaster1(ctx context.Context) error {
}
// XXX update .masterLink + notify waiters
// XXX rxm <- eventReconnect
// RecvM1 <- eventReconnect
select
{
case
<-
ctx
.
Done
()
:
return
ctx
.
Err
()
case
node
.
rxm
<-
_RxM
{
Err
:
eventMasterReconnect
}
:
// ok
}
// receive and handle notifications from master
defer
task
.
Running
(
&
ctx
,
"rx"
)(
&
err
)
...
...
@@ -275,6 +284,8 @@ func (node *_MasteredNode) recvMaster1(ctx context.Context, req neonet.Request)
return
nil
}
var
eventMasterReconnect
=
errors
.
New
(
"(re)connected to master"
)
// RecvM1 receives request from master filtered through δstate handler.
//
// XXX eventReconnect
...
...
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