Ask for help with socket usage questions?

add the code directly as follows:
let isFirst1 = 1;
sockets.forEach ((socket) = > {

if(isFirst1 == 1) { 
    lightLog.info( "bonus" ,dataArr);
    socket.emit( "bonus1" ,dataArr);
    socket.broadcast.emit( "bonus1" ,dataArr);
    isFirst1 = 0;
}else{
    lightLog.info( "" );
}

}); the purpose of
code is to push only once, but the problem now is that when using the isFirst1 flag, it is only sent to yourself and does not broadcast the event. At this time, the event cannot be sent. When the isFirst1 flag is removed, it is OK, but it will be pushed many times at this time. What should I do if I only want to push it once?!?.
in addition, I found that only the broadcast function is useful, socket.emit this seems to be useless, I don"t know why?

Dec.27,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3feba-2c4cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3feba-2c4cb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?