Danga::Socket::write will set the closed flag on a socket,
automatically, and we do not need to bring down an entire
server when one client breaks the connection :P
sub do_write ($$) {
my ($self, $data) = @_;
my $done = $self->write($data);
- die if $self->{closed};
+ return if $self->{closed};
# Do not watch for readability if we have data in the queue,
# instead re-enable watching for readability when we can