From 648fe7f20d4b9b3d6c9b33622822d188dbb09947 Mon Sep 17 00:00:00 2001 From: Kevin Lynx Date: Mon, 5 Aug 2013 22:03:54 +0800 Subject: [PATCH] daman! fix crawler initiali id generation bug (not set random seed) --- src/crawler/crawler_sup.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crawler/crawler_sup.erl b/src/crawler/crawler_sup.erl index 28e7fc5..3ba6b02 100644 --- a/src/crawler/crawler_sup.erl +++ b/src/crawler/crawler_sup.erl @@ -35,6 +35,7 @@ init([{StartPort, Count, DBHost, DBPort, LogLevel, DBConn, CacheTime, HashCacheM {ok, {Spec, Children}}. create_dht_instance(StartPort, Count) -> + random:seed(now()), Dir = "dhtstate/", filelib:ensure_dir(Dir), IDs = create_discrete_ids(Count),