celluloid/celluloid-io — pull request #61 by digitalextremist (2013-04-25 19:46:45+00:00)
Title: Cover Errno::ETIMEDOUT and all other failures to write to Stream.

Been getting this a lot:

```
Reel::RackWorker crashed!
Errno::ETIMEDOUT: Connection timed out - write_nonblock
kernel/common/io.rb:1196:in `write_nonblock'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:64:in `syswrite'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:398:in `synchronize'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:61:in `syswrite'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:356:in `do_write'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-io-6ac8ad9c615b/lib/celluloid/io/stream.rb:256:in `<<'
/usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/response.rb:66:in `render'
/usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/connection.rb:132:in `respond'
/usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/rack_worker.rb:85:in `handle_request'
/usr/local/rvm/gems/rbx-head/bundler/gems/reel-531adaf9465b/lib/reel/rack_worker.rb:65:in `handle'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:25:in `dispatch'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:67:in `dispatch'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/actor.rb:322:in `handle_message'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/tasks.rb:42:in `initialize'
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/tasks/task_fiber.rb:9:in `create'
kernel/bootstrap/proc.rb:22:in `call'
(celluloid):0:in `remote procedure call'
```

Unless I'm wrong, it couldn't hurt to return 0 characters written, as in the case of EOFError which was previously the only caught exception allowed to return 0.