mirror of
https://github.com/axllent/mailpit.git
synced 2025-06-06 23:36:23 +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
|
// Broadcast will spawn a broadcast message to all connected clients
|
||||||
func Broadcast(t string, msg interface{}) {
|
func Broadcast(t string, msg interface{}) {
|
||||||
if MessageHub == nil {
|
if MessageHub == nil || len(MessageHub.Clients) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user