Archived
1
0

be concise

This commit is contained in:
Jeff Becker 2018-01-07 09:33:39 -05:00
parent 517338264d
commit 53522b98eb
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 2 additions and 6 deletions

View File

@ -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)
}

View File

@ -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)
}