Tests for cliet package

This commit is contained in:
Philipp Heckel 2021-12-22 23:20:43 +01:00
parent 6a7e9071b6
commit fe5734d9f0
8 changed files with 162 additions and 43 deletions

View file

@ -191,9 +191,6 @@ func createFirebaseSubscriber(conf *Config) (subscriber, error) {
// Run executes the main server. It listens on HTTP (+ HTTPS, if configured), and starts
// a manager go routine to print stats and prune messages.
func (s *Server) Run() error {
go s.runManager()
go s.runAtSender()
go s.runFirebaseKeepliver()
listenStr := fmt.Sprintf("%s/http", s.config.ListenHTTP)
if s.config.ListenHTTPS != "" {
listenStr += fmt.Sprintf(" %s/https", s.config.ListenHTTPS)
@ -214,6 +211,9 @@ func (s *Server) Run() error {
}()
}
s.mu.Unlock()
go s.runManager()
go s.runAtSender()
go s.runFirebaseKeepliver()
return <-errChan
}