mirror of https://github.com/zlatinb/muwire
do not prepend an S to the history
parent
58a8364901
commit
e1b2582ca6
|
@ -87,10 +87,14 @@ class H2HostCache extends HostCache {
|
||||||
int fs = 0
|
int fs = 0
|
||||||
int fr = 0
|
int fr = 0
|
||||||
int ff = 0
|
int ff = 0
|
||||||
ConnectionAttemptStatus currentStatus = ConnectionAttemptStatus.SUCCESSFUL
|
ConnectionAttemptStatus currentStatus = null
|
||||||
|
|
||||||
sql.eachRow("select STATUS from HOST_ATTEMPTS where DESTINATION=${d.toBase64()} ORDER BY TSTAMP") {
|
sql.eachRow("select STATUS from HOST_ATTEMPTS where DESTINATION=${d.toBase64()} ORDER BY TSTAMP") {
|
||||||
def recordedStatus = ConnectionAttemptStatus.valueOf(it.STATUS)
|
def recordedStatus = ConnectionAttemptStatus.valueOf(it.STATUS)
|
||||||
|
if (currentStatus == null) {
|
||||||
|
currentStatus = recordedStatus
|
||||||
|
return
|
||||||
|
}
|
||||||
switch(currentStatus) {
|
switch(currentStatus) {
|
||||||
case ConnectionAttemptStatus.SUCCESSFUL:
|
case ConnectionAttemptStatus.SUCCESSFUL:
|
||||||
switch(recordedStatus) {
|
switch(recordedStatus) {
|
||||||
|
|
Loading…
Reference in New Issue