OSDN Git Service

modified: sendstream.php
authoryoneda <yoneda@recorder.localnet.mda.or.jp>
Sat, 1 Aug 2009 11:45:29 +0000 (20:45 +0900)
committeryoneda <yoneda@recorder.localnet.mda.or.jp>
Sat, 1 Aug 2009 11:45:29 +0000 (20:45 +0900)
sendstream.php

index c8f5ce7..593504d 100755 (executable)
@@ -38,16 +38,14 @@ try{
                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
+?>