mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Try harder to push data through the wire.
I just learned that the AOLserver module will be used for a 100k users webmail service. Wheee!
This commit is contained in:
parent
57d200c21b
commit
f6eae19147
@ -93,15 +93,22 @@ static void php_ns_config(php_ns_context *ctx, char global);
|
||||
static int
|
||||
php_ns_sapi_ub_write(const char *str, uint str_length)
|
||||
{
|
||||
int sent_bytes;
|
||||
int n;
|
||||
uint sent = 0;
|
||||
NSLS_FETCH();
|
||||
|
||||
sent_bytes = Ns_ConnWrite(NSG(conn), (void *) str, str_length);
|
||||
while (str_length > 0) {
|
||||
n = Ns_ConnWrite(NSG(conn), (void *) str, str_length);
|
||||
|
||||
if (sent_bytes != str_length)
|
||||
php_handle_aborted_connection();
|
||||
if (n == -1)
|
||||
php_handle_aborted_connection();
|
||||
|
||||
str += n;
|
||||
sent += n;
|
||||
str_length -= n;
|
||||
}
|
||||
|
||||
return sent_bytes;
|
||||
return sent;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user