Fix #3823
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index c7185ee..97b8605 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -322,7 +322,7 @@
 			$this->_lock_key = $lock_key;
 			break;
 		}
-		while ($attempt++ < 30);
+		while (++$attempt < 30);
 
 		if ($attempt === 30)
 		{