dedis / onet

Overlay Network for distributed protocols
GNU Lesser General Public License v3.0
50 stars 29 forks source link

Unititialized attribute makes the protocol hang forever #644

Open nkcr opened 4 years ago

nkcr commented 4 years ago

When implementing a new protocol in Onet I forgot to initialize the chan that sends back the response to the service. In this case, I would expect the service and/or protocol to fail and output an error, but it just waits forever.

How to reproduce

Clone the cothority_template, in protocol/protocol.go remove line 43 ChildCount: make(chan int),. Then, launch the protocol's or service's tests. The tests will just hang.