Explorar el Código

Use slightly faster version of the same code.

Yet again, micro-optimizations here.
Daniele Alessandri hace 12 años
padre
commit
ef0067e1a4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/Predis/Connection/StreamConnection.php

+ 1 - 1
lib/Predis/Connection/StreamConnection.php

@@ -101,7 +101,7 @@ class StreamConnection extends AbstractConnection
             stream_set_timeout($resource, $timeoutSeconds, $timeoutUSeconds);
             stream_set_timeout($resource, $timeoutSeconds, $timeoutUSeconds);
         }
         }
 
 
-        if (isset($parameters->tcp_nodelay) && version_compare(PHP_VERSION, '5.4.0', '>=')) {
+        if (isset($parameters->tcp_nodelay) && version_compare(PHP_VERSION, '5.4.0') >= 0) {
             $socket = socket_import_stream($resource);
             $socket = socket_import_stream($resource);
             socket_set_option($socket, SOL_TCP, TCP_NODELAY, (int) $parameters->tcp_nodelay);
             socket_set_option($socket, SOL_TCP, TCP_NODELAY, (int) $parameters->tcp_nodelay);
         }
         }