Jelajahi Sumber

usrloc: fix condition for keepalive interval

Daniel-Constantin Mierla 1 tahun lalu
induk
melakukan
2ffeaf6f48
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/modules/usrloc/ul_keepalive.c

+ 1 - 1
src/modules/usrloc/ul_keepalive.c

@@ -164,7 +164,7 @@ int ul_ka_urecord(urecord_t *ur)
 		}
 		if(ul_ka_interval > 0 && uc->last_keepalive > 0) {
 			ka_limit = ul_ka_interval + (fastrand() % ul_ka_randomize);
-			if((uc->last_keepalive + ka_limit) < tnow) {
+			if((uc->last_keepalive + ka_limit) > tnow) {
 				/* not yet the time for keepalive */
 				continue;
 			}