mirror of https://bitbucket.org/ausocean/av.git
Always try closing manual input reader
This commit is contained in:
parent
391db6b210
commit
7eefcea71c
|
@ -118,12 +118,8 @@ func (m *ManualInput) Start() error {
|
||||||
|
|
||||||
// Stop closes the pipe and sets the isRunning flag to false.
|
// Stop closes the pipe and sets the isRunning flag to false.
|
||||||
func (m *ManualInput) Stop() error {
|
func (m *ManualInput) Stop() error {
|
||||||
if !m.isRunning {
|
if m.reader != nil {
|
||||||
return nil
|
m.reader.Close()
|
||||||
}
|
|
||||||
err := m.reader.Close()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
m.isRunning = false
|
m.isRunning = false
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue