From 7df7af8b54b9f10f7fd7ab9ebd541c6d535860de Mon Sep 17 00:00:00 2001 From: siddontang Date: Sat, 27 Sep 2014 20:11:36 +0800 Subject: [PATCH] client rollback tx when close --- server/client_resp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/client_resp.go b/server/client_resp.go index 1b50bc3..078a02c 100644 --- a/server/client_resp.go +++ b/server/client_resp.go @@ -55,6 +55,11 @@ func (c *respClient) run() { c.conn.Close() } + if c.tx != nil { + c.tx.Rollback() + c.tx = nil + } + c.app.removeSlave(c.client) }()