mirror of
https://github.com/axllent/mailpit.git
synced 2024-12-30 23:17:59 +02:00
UI: Only queue broadcast events if clients are connected
This commit is contained in:
parent
3c744edd20
commit
d2086922e5
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user