Archived
1
0

don't download articles if we already have it locally

This commit is contained in:
Jeff Becker 2017-12-29 11:06:59 -05:00
parent 9c89baf68e
commit a4c8de953a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -1433,6 +1433,10 @@ func (self *nntpConnection) scrapeServer(daemon *NNTPDaemon, conn *textproto.Con
// ask for an article from the remote server // ask for an article from the remote server
// feed it to the daemon if we get it // feed it to the daemon if we get it
func (self *nntpConnection) requestArticle(daemon *NNTPDaemon, conn *textproto.Conn, msgid string) (err error) { func (self *nntpConnection) requestArticle(daemon *NNTPDaemon, conn *textproto.Conn, msgid string) (err error) {
if daemon.store.HasArticle(msgid) {
log.Println("already have", msgid, "so not requesting it")
return
}
// send command // send command
err = conn.PrintfLine("ARTICLE %s", msgid) err = conn.PrintfLine("ARTICLE %s", msgid)
// read response // read response