leveldb: DB.memCompaction should raise errCompactionTransactExiting panic when canceled due to DB being closed #167
diff --git a/leveldb/db_compaction.go b/leveldb/db_compaction.go
index 2d0ad07..b6563e8 100644
--- a/leveldb/db_compaction.go
+++ b/leveldb/db_compaction.go
@@ -289,7 +289,7 @@
 		close(resumeC)
 		resumeC = nil
 	case <-db.closeC:
-		return
+		db.compactionExitTransact()
 	}
 
 	var (
@@ -338,7 +338,7 @@
 		case <-resumeC:
 			close(resumeC)
 		case <-db.closeC:
-			return
+			db.compactionExitTransact()
 		}
 	}