mirror of https://github.com/zlatinb/muwire
add optimistic profiles to newly discovered hosts
parent
a725837769
commit
b1f58b0948
|
@ -40,12 +40,13 @@ class H2HostCache extends HostCache {
|
|||
|
||||
@Override
|
||||
protected synchronized void hostDiscovered(Destination d, boolean fromHostcache) {
|
||||
// overwrite MC with optimistic values
|
||||
if (fromHostcache) {
|
||||
// overwrite MC with optimistic values
|
||||
sql.execute("delete from HOST_ATTEMPTS where DESTINATION='${d.toBase64()}';")
|
||||
profiles.put(d, new HostMCProfile())
|
||||
} else if (uniqueHosts.add(d)) {
|
||||
allHosts.add(d)
|
||||
profiles.put(d, new HostMCProfile())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue