switch to BROKEN const delcration when error in data loop
This commit is contained in:
parent
abe6337dc2
commit
dbbec0954a
1 changed files with 2 additions and 2 deletions
|
@ -301,7 +301,7 @@ func (agent *SRTManager) process_data(packet *Packet) (*Packet) {
|
|||
case SHUTDOWN:
|
||||
// state 3 should raise error and shutdown tunnel,
|
||||
// for now start cleanup procedure in 10s
|
||||
agent.state = 3
|
||||
agent.state = BROKEN
|
||||
go CleanFiles(agent.stream_key, 10)
|
||||
default:
|
||||
return nil
|
||||
|
@ -325,7 +325,7 @@ func (agent *SRTManager) handle_data_storage(packet *Packet) {
|
|||
}
|
||||
// write out all possible packets
|
||||
if err := agent.storage.Expunge(agent.output); err != nil {
|
||||
agent.state = 4
|
||||
agent.state = BROKEN
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue