This commit is contained in:
Noah 2023-02-05 22:16:36 -08:00
parent d8de60c990
commit 4810d95a65
2 changed files with 6 additions and 6 deletions

View File

@ -2,4 +2,4 @@ package barertc
import "time" import "time"
const PingInterval = 60 * time.Second const PingInterval = 15 * time.Second

View File

@ -144,7 +144,7 @@ func (s *Server) OnOpen(sub *Subscriber, msg Message) {
// Look up the other subscriber. // Look up the other subscriber.
other, err := s.GetSubscriber(msg.Username) other, err := s.GetSubscriber(msg.Username)
if err != nil { if err != nil {
sub.ChatServer(err.Error()) log.Error(err.Error())
return return
} }
@ -172,7 +172,7 @@ func (s *Server) OnCandidate(sub *Subscriber, msg Message) {
// Look up the other subscriber. // Look up the other subscriber.
other, err := s.GetSubscriber(msg.Username) other, err := s.GetSubscriber(msg.Username)
if err != nil { if err != nil {
sub.ChatServer(err.Error()) log.Error(err.Error())
return return
} }
@ -188,7 +188,7 @@ func (s *Server) OnSDP(sub *Subscriber, msg Message) {
// Look up the other subscriber. // Look up the other subscriber.
other, err := s.GetSubscriber(msg.Username) other, err := s.GetSubscriber(msg.Username)
if err != nil { if err != nil {
sub.ChatServer(err.Error()) log.Error(err.Error())
return return
} }
@ -204,7 +204,7 @@ func (s *Server) OnWatch(sub *Subscriber, msg Message) {
// Look up the other subscriber. // Look up the other subscriber.
other, err := s.GetSubscriber(msg.Username) other, err := s.GetSubscriber(msg.Username)
if err != nil { if err != nil {
sub.ChatServer(err.Error()) log.Error(err.Error())
return return
} }
@ -219,7 +219,7 @@ func (s *Server) OnUnwatch(sub *Subscriber, msg Message) {
// Look up the other subscriber. // Look up the other subscriber.
other, err := s.GetSubscriber(msg.Username) other, err := s.GetSubscriber(msg.Username)
if err != nil { if err != nil {
sub.ChatServer(err.Error()) log.Error(err.Error())
return return
} }