Explorar el Código

Fixes SER-317:
Under heavy load some transactions time out after
fr_timer expires even though 180 response
was received and forwarded to the caller.

Miklos Tirpak hace 18 años
padre
commit
8aded3c4c4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      modules/tm/timer.h

+ 1 - 1
modules/tm/timer.h

@@ -143,7 +143,7 @@ inline static int _set_fr_retr(struct retr_buf* rb, ticks_t retr)
 		((s_ticks_t)(eol-(ticks+timeout))<0)) ){ /* fr after end of life */
 		timeout=(((s_ticks_t)(eol-ticks))>0)?(eol-ticks):1; /* expire now */ 
 	}
-	rb->fr_expire=ticks+timeout;
+	atomic_cmpxchg_int((void*)&rb->fr_expire, 0, (int)(ticks+timeout));
 #ifdef TIMER_DEBUG
 	ret=timer_add_safe(&(rb)->timer, (timeout<retr)?timeout:retr,
 							file, func, line);