switched NewDiscardRouter() to return the same instance each time.

master
Charles Iliya Krempeaux 2015-10-10 02:11:19 -07:00
parent f151008688
commit 7b9d03c556
1 changed files with 5 additions and 3 deletions

View File

@ -1,10 +1,12 @@
package flog
func NewDiscardRouter() *DiscardRouter {
router := DiscardRouter{}
var (
singltonDiscardRouter = DiscardRouter{}
)
return &router
func NewDiscardRouter() *DiscardRouter {
return &singltonDiscardRouter
}