terminate RTC sessions properly

This commit is contained in:
David Zhao
2021-01-19 16:18:03 -08:00
parent 71b4673a0a
commit 0b00b26d05
10 changed files with 254 additions and 174 deletions
+2 -9
View File
@@ -1,8 +1,6 @@
package routing
import (
"io"
"google.golang.org/protobuf/proto"
)
@@ -26,13 +24,8 @@ func (m *MessageChannel) WriteMessage(msg proto.Message) error {
return nil
}
func (m *MessageChannel) ReadMessage() (proto.Message, error) {
msg := <-m.msgChan
// channel closed
if msg == nil {
return nil, io.EOF
}
return msg, nil
func (m *MessageChannel) ReadChan() <-chan proto.Message {
return m.msgChan
}
func (m *MessageChannel) Close() {