mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-15 20:13:16 +02: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