diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-03-19 01:18:36 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-03-19 01:21:53 +0200 |
commit | 7a4b108b37ccf415f75d74738dddbdba23af1805 (patch) | |
tree | c24add86e6e6f489ef9e05bf9a5463463613fa12 /matrix | |
parent | f288a18a0c0ea2609667a02ebe42ca0a8b034004 (diff) |
Avoid showing panics directly if debug mode is not enabled
Diffstat (limited to 'matrix')
-rw-r--r-- | matrix/matrix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 7652188..564dc81 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -198,13 +198,13 @@ func (c *Container) HandleTyping(evt *gomatrix.Event) { } func (c *Container) SendMessage(roomID, message string) { - c.gmx.Recover() + defer c.gmx.Recover() c.SendTyping(roomID, false) c.client.SendText(roomID, message) } func (c *Container) SendTyping(roomID string, typing bool) { - c.gmx.Recover() + defer c.gmx.Recover() ts := time.Now().Unix() if c.typing > ts && typing { return |