mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 21:32:56 +01:00
debug log relay reconnections.
This commit is contained in:
parent
d0f53b3b7a
commit
8446557788
8
pool.go
8
pool.go
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"net/http"
|
||||
"slices"
|
||||
@ -329,6 +328,7 @@ func (pool *SimplePool) subMany(
|
||||
}
|
||||
|
||||
// otherwise (if we were connected and got disconnected) keep trying to reconnect
|
||||
debugLogf("%s reconnecting because connection failed\n", nm)
|
||||
goto reconnect
|
||||
}
|
||||
firstConnection = false
|
||||
@ -343,6 +343,7 @@ func (pool *SimplePool) subMany(
|
||||
return exists
|
||||
}))...)
|
||||
if err != nil {
|
||||
debugLogf("%s reconnecting because subscription died\n", nm)
|
||||
goto reconnect
|
||||
}
|
||||
|
||||
@ -370,6 +371,7 @@ func (pool *SimplePool) subMany(
|
||||
for i := range filters {
|
||||
filters[i].Since = &now
|
||||
}
|
||||
debugLogf("%s reconnecting because sub.Events is broken\n", nm)
|
||||
goto reconnect
|
||||
}
|
||||
|
||||
@ -405,7 +407,7 @@ func (pool *SimplePool) subMany(
|
||||
goto subscribe
|
||||
}
|
||||
} else {
|
||||
log.Printf("CLOSED from %s: '%s'\n", nm, reason)
|
||||
debugLogf("CLOSED from %s: '%s'\n", nm, reason)
|
||||
}
|
||||
|
||||
return
|
||||
@ -514,7 +516,7 @@ func (pool *SimplePool) subManyEoseNonOverwriteCheckDuplicate(
|
||||
goto subscribe
|
||||
}
|
||||
}
|
||||
log.Printf("CLOSED from %s: '%s'\n", nm, reason)
|
||||
debugLogf("CLOSED from %s: '%s'\n", nm, reason)
|
||||
return
|
||||
case evt, more := <-sub.Events:
|
||||
if !more {
|
||||
|
Loading…
x
Reference in New Issue
Block a user