mirror of
https://github.com/vee1e/subidx.git
synced 2026-09-01 09:50:18 +00:00
tailer: fix nil client dereference on malformed log key
NewClient returns (nil, err) when a log list entry has an undecodable key, but the error path called client.ShortID() on the nil client, panicking the tailer goroutine and crashing the process.
This commit is contained in:
parent
6f5b4c961f
commit
394174763d
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ func (t *Tailer) Wait() {
|
|||
func (t *Tailer) tailOne(ctx context.Context, lg loglist.Log, state string) {
|
||||
client, err := rfc6962.NewClient(lg.Endpoint(), lg.Key)
|
||||
if err != nil {
|
||||
log.Printf("tail %s: %v", client.ShortID(), err)
|
||||
log.Printf("tail %s: %v", lg.LogID, err)
|
||||
return
|
||||
}
|
||||
id := lg.LogID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue