NebulousLabs/Sia — pull request #116 by lukechampine (2014-05-18 02:31:17+00:00)
Title: Timeouts

This change adds timeouts to the `Send(Async)Message()` functions. The timeout is currently set at `StepDuration / 2`.

One thing I am unsure of here is sending `call.Done <- nil` in the timeout goroutine. I believe this will block indefinitely if `call.Done` has a size of 1 and already has a value in it. To rectify this, I increases the size of `call.Done` to 2, but this may be unnecessary.