fix
This commit is contained in:
parent
92320aff4c
commit
0266deee2b
@ -591,16 +591,16 @@ func (self *articleStore) GetMessage(msgid string) (nntp NNTPMessage) {
|
|||||||
hdr := textproto.MIMEHeader(msg.Header)
|
hdr := textproto.MIMEHeader(msg.Header)
|
||||||
err = read_message_body(msg.Body, hdr, nil, nil, true, func(n NNTPMessage) {
|
err = read_message_body(msg.Body, hdr, nil, nil, true, func(n NNTPMessage) {
|
||||||
c := chnl
|
c := chnl
|
||||||
|
if n != nil {
|
||||||
// inject pubkey for mod
|
// inject pubkey for mod
|
||||||
n.Headers().Set("X-PubKey-Ed25519", hdr.Get("X-PubKey-Ed25519"))
|
n.Headers().Set("X-PubKey-Ed25519", hdr.Get("X-PubKey-Ed25519"))
|
||||||
c <- n
|
c <- n
|
||||||
close(c)
|
}
|
||||||
})
|
})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
nntp = <-chnl
|
nntp = <-chnl
|
||||||
} else {
|
} else {
|
||||||
log.Println("GetMessage() failed to load", msgid, err)
|
log.Println("GetMessage() failed to load", msgid, err)
|
||||||
close(chnl)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user