NebulousLabs/Sia — pull request #129 by lukechampine (2014-05-28 02:41:09+00:00)
Title: Close RPC connections and don't block

This fixes the bug described in #124. Connections were not being closed, leading to a tcp connection error after the available pool of file descriptors had been exhausted.

Also, the `select` statement in `SendAsyncMessage()` might have caused some goroutines to block indefinitely; a `return` has been added to fix this.