()
| 61 | } |
| 62 | |
| 63 | func (this *MongoDBMgr) Close() { |
| 64 | if this.session != nil { |
| 65 | this.session.DB("").Logout() |
| 66 | this.session.Close() |
| 67 | this.session = nil |
| 68 | slog.LogInfo("mongodb", "Disconnect mongodb url: ", this.dbcfg.String()) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func (this *MongoDBMgr) Ping() error { |
| 73 | if this.session != nil { |