Terminate goroutines

This should fix #2. `setLast` was invoked from multiple goroutines, but because `WriteTo` might have returned, the slowest sender will wait indefinitely.