Sending the stop message to the right port

Sending the stop message to the right port
by Kirill Nikitin - Tuesday, 17 November 2020, 16:57

Dear students,

Some of you have experienced "hanging" in the tests. If you are stopping your gossiper by sending a stop message to a local port, make sure that you are sending it to gossiper.GetLocalAddr(), and not to the address that we supply from the tests. Otherwise, this might be reason why your gossiper never stops, and the tests run forever. The address that we give in the tests is which gets translated to the local address with a currently-available random port, as per the Golang specifications. Thus, you need to learn what address has been generated to able to send your stop message there.