aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/client_conn.go')
-rw-r--r--hotline/client_conn.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hotline/client_conn.go b/hotline/client_conn.go
index 5428ea5..9ca93a7 100644
--- a/hotline/client_conn.go
+++ b/hotline/client_conn.go
@@ -114,6 +114,10 @@ func (cc *ClientConn) SendAll(t [2]byte, fields ...Field) {
}
func (cc *ClientConn) handleTransaction(transaction Transaction) {
+ // Contain panics to the individual transaction so a single malformed request
+ // cannot tear down the whole client connection.
+ defer dontPanic(cc.Logger)
+
if handler, ok := cc.Server.handlers[transaction.Type]; ok {
if transaction.Type != TranKeepAlive {
cc.Logger.Info(tranTypeNames[transaction.Type])