summaryrefslogtreecommitdiffstats
path: root/modules/mailer
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-16 23:08:46 -0400
committerUnknwon <u@gogs.io>2015-09-16 23:08:46 -0400
commite75fd2f783a413ae612e3e6110c912b3ecf9555d (patch)
tree969e7fc034c60db60695780b75815bbba17db7e8 /modules/mailer
parenta517cfdf7b24514d7c1f6695dc175ce18c832465 (diff)
downloadgitea-e75fd2f783a413ae612e3e6110c912b3ecf9555d.tar.gz
gitea-e75fd2f783a413ae612e3e6110c912b3ecf9555d.zip
simplify names
Diffstat (limited to 'modules/mailer')
-rw-r--r--modules/mailer/mailer.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go
index 28c19ed7cd..b877bdaa1a 100644
--- a/modules/mailer/mailer.go
+++ b/modules/mailer/mailer.go
@@ -70,8 +70,12 @@ func (m Message) Content() string {
var mailQueue chan *Message
-func NewMailerContext() {
- mailQueue = make(chan *Message, setting.Cfg.Section("mailer").Key("SEND_BUFFER_LEN").MustInt(10))
+func NewContext() {
+ if setting.MailService == nil {
+ return
+ }
+
+ mailQueue = make(chan *Message, setting.MailService.QueueLength)
go processMailQueue()
}