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
eea1a4f6
Commit
eea1a4f6
authored
Jan 29, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
897bd5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
go/neo/mastered.go
go/neo/mastered.go
+7
-5
No files found.
go/neo/mastered.go
View file @
eea1a4f6
...
...
@@ -227,7 +227,7 @@ func (node *_MasteredNode) talkMaster1(ctx, ctxPreTalkM context.Context, f func(
node
.
updateOperational
(
func
()
{
err
=
node
.
updateNodeTab
(
ctx
,
&
mnt
)
// the only err is cmdShutdown
node
.
state
.
PartTab
=
pt
if
err
!
=
nil
{
if
err
=
=
nil
{
// keep mlink=nil on shutdown so that
// .operational does not change to y.
node
.
mlink
=
mlink
...
...
@@ -351,7 +351,7 @@ func (node *_MasteredNode) recvδstate(ctx context.Context, msg proto.Msg) (δpt
}
// updateOperational calls δf under .opMu and updates .operational from current state.
//
it also notifies those who was waiting for it if operational state becomes read
y.
//
After .opMu unlock it also notifies those who was waiting for .operational to become
y.
func
(
node
*
_MasteredNode
)
updateOperational
(
δf
func
())
{
var
opready
chan
struct
{}
...
...
@@ -362,9 +362,11 @@ func (node *_MasteredNode) updateOperational(δf func()) {
operational
:=
(
node
.
mlink
!=
nil
)
&&
node
.
state
.
IsOperational
()
//fmt.Printf("\nupdateOperatinal: %v\n", operational)
//fmt.Println(node.partTab)
//fmt.Println(node.nodeTab)
fmt
.
Printf
(
"
\n
updateOperatinal: %v
\n
"
,
operational
)
fmt
.
Printf
(
" mlink: %s
\n
"
,
node
.
mlink
)
fmt
.
Printf
(
" state: %s
\n
"
,
node
.
state
.
Code
)
fmt
.
Printf
(
" partTab:
\n
%s"
,
node
.
state
.
PartTab
)
fmt
.
Printf
(
" nodeTab:
\n
%s"
,
node
.
state
.
NodeTab
)
if
operational
!=
node
.
operational
{
node
.
operational
=
operational
...
...
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