X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=c53bc129cb6a7dbcc5e44cfae66fcc17e5b64109;hp=347f78181c31aeab3cff9100588f0ad8320b077d;hb=4d4d6635ada968ed67e4e82a6469f2843231a828;hpb=3649d941fa4c6bfec3eae447e713f42d82fb025a diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 347f781..c53bc12 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -625,6 +625,11 @@ sub write { my $len = length($buffer); my $wrote = syswrite STDOUT, $buffer; + if ( !defined $wrote && $! == EWOULDBLOCK ) { + # Unable to write on the first try, will retry in the loop below + $wrote = 0; + } + if ( defined $wrote && $wrote < $len ) { # We didn't write the whole buffer while (1) {