initialize peer to Unknown
This commit is contained in:
@@ -102,6 +102,7 @@ void peer_add_addr(struct HBContext *ctx, const struct sockaddr_in *addr)
|
|||||||
|
|
||||||
peer->timer.callback = peer_timer_cb;
|
peer->timer.callback = peer_timer_cb;
|
||||||
peer->timer.cookie_ptr = ctx;
|
peer->timer.cookie_ptr = ctx;
|
||||||
|
peer->state = PeerUnknown;
|
||||||
|
|
||||||
sec = rand() % PEER_HB_SEC;
|
sec = rand() % PEER_HB_SEC;
|
||||||
usec = rand() % 1000000;
|
usec = rand() % 1000000;
|
||||||
|
|||||||
Reference in New Issue
Block a user