From 4810d95a658cbda4f7d70efd4661a0927c1141b4 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 5 Feb 2023 22:16:36 -0800 Subject: [PATCH] Cleanup --- pkg/config.go | 2 +- pkg/handlers.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/config.go b/pkg/config.go index 64c9648..1f191b2 100644 --- a/pkg/config.go +++ b/pkg/config.go @@ -2,4 +2,4 @@ package barertc import "time" -const PingInterval = 60 * time.Second +const PingInterval = 15 * time.Second diff --git a/pkg/handlers.go b/pkg/handlers.go index 1610a49..fb09c38 100644 --- a/pkg/handlers.go +++ b/pkg/handlers.go @@ -144,7 +144,7 @@ func (s *Server) OnOpen(sub *Subscriber, msg Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { - sub.ChatServer(err.Error()) + log.Error(err.Error()) return } @@ -172,7 +172,7 @@ func (s *Server) OnCandidate(sub *Subscriber, msg Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { - sub.ChatServer(err.Error()) + log.Error(err.Error()) return } @@ -188,7 +188,7 @@ func (s *Server) OnSDP(sub *Subscriber, msg Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { - sub.ChatServer(err.Error()) + log.Error(err.Error()) return } @@ -204,7 +204,7 @@ func (s *Server) OnWatch(sub *Subscriber, msg Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { - sub.ChatServer(err.Error()) + log.Error(err.Error()) return } @@ -219,7 +219,7 @@ func (s *Server) OnUnwatch(sub *Subscriber, msg Message) { // Look up the other subscriber. other, err := s.GetSubscriber(msg.Username) if err != nil { - sub.ChatServer(err.Error()) + log.Error(err.Error()) return }