diff sendstream.php @ 60:01079b81f125

modified: sendstream.php
author yoneda <yoneda@recorder.localnet.mda.or.jp>
date Sat, 01 Aug 2009 20:45:29 +0900
parents f40b6cc4c587
children
line wrap: on
line diff
--- a/sendstream.php	Sat Aug 01 18:35:11 2009 +0900
+++ b/sendstream.php	Sat Aug 01 20:45:29 2009 +0900
@@ -38,16 +38,14 @@
 		do {
 			$start = microtime(true);
 			if( feof( $fp ) ) break;
-			
 			echo fread( $fp, 6292 );
-			
-			usleep( 2000 - (int)((microtime(true) - $start) * 1000)  );
+			@usleep( 2000 - (int)((microtime(true) - $start) * 1000 * 1000));
 		}
-		while( ! connection_aborted() );
+		while( connection_aborted() == 0 );
 	}
 	fclose($fp);
 }
 catch(exception $e ) {
 	exit( $e->getMessage() );
 }
-?>
\ No newline at end of file
+?>