Skip to content

Commit be67c10

Browse files
committed
adding small readln() line for blocking nodes before election
1 parent 0bb624c commit be67c10

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/kotlin/cz/ctu/fee/dsv/semwork/rastvdmy/MessageReceiver.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class MessageReceiver(node: Node?) : NodeCommands {
9595
override fun nodeMissing(addr: Address?) {
9696
println("NodeMissing was called with $addr")
9797
if (addr!!.compareTo(myNode!!.neighbours!!.right) == 0) {
98+
// readln() // Waiting for the user to press entering (blocking the nodes for an election process)
9899
// It's for me
99100
val myNeighbours = myNode!!.neighbours
100101
// to my nnext send msg ChPrev with myaddr -> my nnext = next

0 commit comments

Comments
 (0)