aboutsummaryrefslogtreecommitdiff
path: root/hotline/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/server.go')
-rw-r--r--hotline/server.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/hotline/server.go b/hotline/server.go
index 1fafb30..ccf992e 100644
--- a/hotline/server.go
+++ b/hotline/server.go
@@ -18,7 +18,6 @@ import (
"net"
"os"
"path/filepath"
- "runtime/debug"
"strings"
"sync"
"time"
@@ -542,14 +541,6 @@ func (s *Server) loadConfig(path string) error {
return nil
}
-// dontPanic logs panics instead of crashing
-func dontPanic(logger *zap.SugaredLogger) {
- if r := recover(); r != nil {
- fmt.Println("stacktrace from panic: \n" + string(debug.Stack()))
- logger.Errorw("PANIC", "err", r, "trace", string(debug.Stack()))
- }
-}
-
// handleNewConnection takes a new net.Conn and performs the initial login sequence
func (s *Server) handleNewConnection(ctx context.Context, rwc io.ReadWriteCloser, remoteAddr string) error {
defer dontPanic(s.Logger)