muck about
This commit is contained in:
parent
7e1a6cc8f5
commit
74ca4caca5
@ -581,7 +581,7 @@ func (self *NNTPDaemon) Run() {
|
||||
|
||||
self.register_connection = make(chan *nntpConnection)
|
||||
self.deregister_connection = make(chan *nntpConnection)
|
||||
self.send_all_feeds = make(chan ArticleEntry)
|
||||
self.send_all_feeds = make(chan ArticleEntry, 128)
|
||||
self.activeConnections = make(map[string]*nntpConnection)
|
||||
self.loadedFeeds = make(map[string]*feedState)
|
||||
self.register_feed = make(chan FeedConfig)
|
||||
@ -589,7 +589,7 @@ func (self *NNTPDaemon) Run() {
|
||||
self.get_feeds = make(chan chan []*feedStatus)
|
||||
self.get_feed = make(chan *feedStatusQuery)
|
||||
self.modify_feed_policy = make(chan *modifyFeedPolicyEvent)
|
||||
self.ask_for_article = make(chan string)
|
||||
self.ask_for_article = make(chan string, 128)
|
||||
|
||||
self.pump_ticker = time.NewTicker(time.Millisecond * 100)
|
||||
if self.conf.daemon["archive"] == "1" {
|
||||
@ -917,7 +917,7 @@ func (self *NNTPDaemon) processMessage(msgid string) {
|
||||
// send to frontend
|
||||
if self.frontend != nil {
|
||||
if self.frontend.AllowNewsgroup(group) {
|
||||
go self.frontend.HandleNewPost(frontendPost{msgid, ref, group})
|
||||
self.frontend.HandleNewPost(frontendPost{msgid, ref, group})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -324,10 +324,10 @@ func (self *httpFrontend) poll_liveui() {
|
||||
th := threads[c-idx-1]
|
||||
th.Update(self.daemon.database)
|
||||
// send root post
|
||||
go live.Inform(th.OP())
|
||||
live.Inform(th.OP())
|
||||
// send replies
|
||||
for _, post := range th.Replies() {
|
||||
go live.Inform(post)
|
||||
live.Inform(post)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -392,7 +392,7 @@ func (self *httpFrontend) HandleNewPost(nntp frontendPost) {
|
||||
if len(ref) > 0 {
|
||||
msgid = ref
|
||||
}
|
||||
go func() {
|
||||
|
||||
entry := ArticleEntry{msgid, group}
|
||||
// regnerate thread
|
||||
self.Regen(entry)
|
||||
@ -402,7 +402,7 @@ func (self *httpFrontend) HandleNewPost(nntp frontendPost) {
|
||||
}
|
||||
// regen front page
|
||||
self.RegenFrontPage()
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
// create a new captcha, return as json object
|
||||
@ -1098,6 +1098,7 @@ func (self *httpFrontend) handle_api_find(wr http.ResponseWriter, r *http.Reques
|
||||
} else {
|
||||
self.daemon.database.SearchQuery(self.prefix, g, s, chnl)
|
||||
}
|
||||
chnl <- nil
|
||||
<-donechnl
|
||||
close(donechnl)
|
||||
io.WriteString(wr, " null ]")
|
||||
@ -1541,9 +1542,9 @@ func NewHTTPFrontend(daemon *NNTPDaemon, cache CacheInterface, config map[string
|
||||
|
||||
// liveui related members
|
||||
front.liveui_chnl = make(chan PostModel, 128)
|
||||
front.liveui_register = make(chan *liveChan)
|
||||
front.liveui_deregister = make(chan *liveChan)
|
||||
front.liveui_chans = make(map[string]*liveChan)
|
||||
front.liveui_register = make(chan *liveChan, 128)
|
||||
front.liveui_deregister = make(chan *liveChan, 128)
|
||||
front.liveui_chans = make(map[string]*liveChan, 128)
|
||||
front.end_liveui = make(chan bool)
|
||||
return front
|
||||
}
|
||||
|
Reference in New Issue
Block a user