* audrius butkevicius: > I am looking for advice how this could be implemented in a more robust way > without leaking resources.
You can't with just an io.Writer. If a write operation cannot be canceled (and io.Writer does not provide this capability), a timeout will always result in a resource leak. The leak could be temporary if the write eventually times out on its own, but this is not guaranteed to happen (even for simple things such as TCP connections). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.