diff options
Diffstat (limited to 'src/rhctl/playout_server.go')
-rw-r--r-- | src/rhctl/playout_server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go index 5491b23..276c462 100644 --- a/src/rhctl/playout_server.go +++ b/src/rhctl/playout_server.go @@ -43,10 +43,10 @@ type PlayoutServer struct { func (srv *PlayoutServer) Run() { rhdl.Printf("running playout server: %s", srv.name) - srv.control.tx <- fmt.Sprintf("hello %s", srv.name) - srv.heartbeat.tx <- fmt.Sprintf("beat %s", srv.name) - time.Sleep(5 * time.Second) + for { + time.Sleep(time.Second) + } } func ServerInit(name string, conf *Config) (srv *PlayoutServer, err error) { @@ -55,11 +55,11 @@ func ServerInit(name string, conf *Config) (srv *PlayoutServer, err error) { srv.health = Dead srv.channel = "music" - if srv.control, err = SerialOpenAndHandle(conf.Servers[name].ControlDevice, conf.Servers[name].ControlBaudrate, "\r\n"); err != nil { + if srv.control, err = SerialOpen(conf.Servers[name].ControlDevice, conf.Servers[name].ControlBaudrate, "\r\n"); err != nil { err = fmt.Errorf("Error opening control port(%s): %s", srv.name, err) return } - if srv.heartbeat, err = SerialOpenAndHandle(conf.Servers[name].HeartbeatDevice, conf.Servers[name].HeartbeatBaudrate, "\r\n"); err != nil { + if srv.heartbeat, err = SerialOpen(conf.Servers[name].HeartbeatDevice, conf.Servers[name].HeartbeatBaudrate, "\r\n"); err != nil { err = fmt.Errorf("Error opening control port(%s): %s", srv.name, err) return } |