mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-28 06:56:06 +00:00
UI: Only queue broadcast events if clients are connected
This commit is contained in:
@@ -69,7 +69,7 @@ func (h *Hub) Run() {
|
||||
|
||||
// Broadcast will spawn a broadcast message to all connected clients
|
||||
func Broadcast(t string, msg interface{}) {
|
||||
if MessageHub == nil {
|
||||
if MessageHub == nil || len(MessageHub.Clients) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user