Subversion-Projekte lars-tiefland.ci

Revision

Revision 2049 | Revision 2242 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2049 Revision 2107
Zeile 308... Zeile 308...
308
		if ($this->_lock_key === $this->_key_prefix.$session_id.':lock')
308
		if ($this->_lock_key === $this->_key_prefix.$session_id.':lock')
309
		{
309
		{
310
			if ( ! $this->_memcached->replace($this->_lock_key, time(), 300))
310
			if ( ! $this->_memcached->replace($this->_lock_key, time(), 300))
311
			{
311
			{
312
				return ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND)
312
				return ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND)
313
					? $this->_memcached->set($this->_lock_key, time(), 300)
313
					? $this->_memcached->add($this->_lock_key, time(), 300)
314
					: FALSE;
314
					: FALSE;
315
			}
315
			}
316
		}
316
		}
Zeile 317... Zeile 317...
317
 
317
 
Zeile 324... Zeile 324...
324
			{
324
			{
325
				sleep(1);
325
				sleep(1);
326
				continue;
326
				continue;
327
			}
327
			}
Zeile -... Zeile 328...
-
 
328
 
328
 
329
			$method = ($this->_memcached->getResultCode() === Memcached::RES_NOTFOUND) ? 'add' : 'set';
329
			if ( ! $this->_memcached->set($lock_key, time(), 300))
330
			if ( ! $this->_memcached->$method($lock_key, time(), 300))
330
			{
331
			{
331
				log_message('error', 'Session: Error while trying to obtain lock for '.$this->_key_prefix.$session_id);
332
				log_message('error', 'Session: Error while trying to obtain lock for '.$this->_key_prefix.$session_id);
332
				return FALSE;
333
				return FALSE;