be concise
This commit is contained in:
parent
517338264d
commit
53522b98eb
@ -670,7 +670,6 @@ func (self *NNTPDaemon) Run() {
|
||||
names, err := f.Readdirnames(0)
|
||||
if err == nil {
|
||||
for _, name := range names {
|
||||
self.store.AcceptTempArticle(name)
|
||||
self.loadFromInfeed(name)
|
||||
}
|
||||
}
|
||||
@ -710,6 +709,7 @@ func (self *NNTPDaemon) syncAllMessages() {
|
||||
|
||||
// load a message from the infeed directory
|
||||
func (self *NNTPDaemon) loadFromInfeed(msgid string) {
|
||||
self.store.AcceptTempArticle(msgid)
|
||||
go self.processMessage(msgid)
|
||||
}
|
||||
|
||||
|
@ -784,12 +784,8 @@ func storeMessage(daemon *NNTPDaemon, hdr textproto.MIMEHeader, body io.Reader)
|
||||
pr.Close()
|
||||
f.Close()
|
||||
if err == nil {
|
||||
// move temp article to articles dir
|
||||
err = daemon.store.AcceptTempArticle(msgid)
|
||||
// tell daemon
|
||||
if err == nil {
|
||||
daemon.loadFromInfeed(msgid)
|
||||
}
|
||||
} else {
|
||||
log.Println("error processing message body", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user