-the counter don't stop
This commit is contained in:
parent
3c58b3bef5
commit
2d95efcaf8
10 changed files with 19 additions and 21 deletions
|
@ -167,9 +167,10 @@ func (stream *PriorityStream) SendPriority(pri []string) {
|
|||
}
|
||||
|
||||
func (stream *PriorityStream) timer() {
|
||||
if stream.Start {
|
||||
timer := time.NewTimer(stream.Duration)
|
||||
for {
|
||||
for {
|
||||
if stream.Start {
|
||||
timer := time.NewTimer(stream.Duration)
|
||||
|
||||
select {
|
||||
case <-timer.C:
|
||||
stream.Start = false
|
||||
|
@ -178,10 +179,10 @@ func (stream *PriorityStream) timer() {
|
|||
Mode: Stop.String(),
|
||||
}
|
||||
stream.Message <- msg
|
||||
return
|
||||
continue
|
||||
default:
|
||||
if len(stream.TotalClients) > 0 {
|
||||
currentTimer := fmt.Sprintf("The Current Time Is %v", formatTime(stream.Duration))
|
||||
currentTimer := fmt.Sprintf("%v", formatTime(stream.Duration))
|
||||
|
||||
msg := Message{
|
||||
Duration: currentTimer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue