To simulate the leaving of hosts you have two possibilities:
1. Let a node leave the network by using the leave() or fail() methods
of the GnutellaOverlayNode class (These operations are implemented not
in the application because they are direct functions of p2p nodes).
2. You can use a ChurnGenerator (see different example configurations).
It provides the leaving and joining of nodes depending on different
Depending on your scenario one of these options should help you.