From 53522b98ebb047424d0626d183f5c96e5a107831 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 7 Jan 2018 09:33:39 -0500 Subject: [PATCH] be concise --- contrib/backends/srndv2/src/srnd/daemon.go | 2 +- contrib/backends/srndv2/src/srnd/util.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/daemon.go b/contrib/backends/srndv2/src/srnd/daemon.go index 16bae61..72ef72e 100644 --- a/contrib/backends/srndv2/src/srnd/daemon.go +++ b/contrib/backends/srndv2/src/srnd/daemon.go @@ -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) } diff --git a/contrib/backends/srndv2/src/srnd/util.go b/contrib/backends/srndv2/src/srnd/util.go index 0c2de14..dc7f286 100644 --- a/contrib/backends/srndv2/src/srnd/util.go +++ b/contrib/backends/srndv2/src/srnd/util.go @@ -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) - } + daemon.loadFromInfeed(msgid) } else { log.Println("error processing message body", err) }