r84317 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84316‎ | r84317 | r84318 >
Date:12:07, 19 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
Use stream_set_timeout() to avoid a socket timeout before the pool timeout occurs.
Modified paths:
  • /trunk/extensions/PoolCounter/PoolCounterClient_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PoolCounter/PoolCounterClient_body.php
@@ -82,6 +82,10 @@
8383 return $status;
8484 }
8585 $this->conn = $status->value;
 86+
 87+ // Set the read timeout to be 1.5 times the pool timeout.
 88+ // This allows the server to time out gracefully before we give up on it.
 89+ stream_set_timeout( $this->conn, 0, $this->timeout * 1e6 * 1.5 );
8690 }
8791 return Status::newGood( $this->conn );
8892 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r84319MFT r84317: fix read timeouttstarling12:11, 19 March 2011

Status & tagging log