befly 3.20.4 → 3.20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@
24
24
  "port": 3306,
25
25
  "username": "root",
26
26
  "password": "root",
27
- "database": "befly_dev",
27
+ "database": "befly",
28
28
  "max": 10,
29
29
  "beflyMode": "auto"
30
30
  },
@@ -35,7 +35,7 @@
35
35
  "username": "",
36
36
  "password": "",
37
37
  "db": 0,
38
- "prefix": "befly_demo"
38
+ "prefix": "befly"
39
39
  },
40
40
 
41
41
  "session": {
package/lib/connect.js CHANGED
@@ -89,9 +89,16 @@ export class Connect {
89
89
  };
90
90
 
91
91
  // Called when disconnected from Redis server
92
- this.redisClient.onclose = () => {
93
- Logger.warn("Redis 断开连接");
92
+ this.redisClient.onclose = (error) => {
93
+ if (error) {
94
+ Logger.warn(`Redis 断开连接:${error.message ?? error}`);
95
+ } else {
96
+ Logger.warn("Redis 断开连接");
97
+ }
94
98
  };
99
+
100
+ // Eagerly verify the connection before returning
101
+ await this.redisClient.ping();
95
102
  } catch (error) {
96
103
  await this.redisClient?.close();
97
104
  this.redisClient = null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.20.4",
4
- "gitHead": "96067cc5c780c97ab6eb8c37c54d938739f71bbd",
3
+ "version": "3.20.5",
4
+ "gitHead": "523163fa281ad94542dda8e88551360c4cb8b200",
5
5
  "private": false,
6
6
  "description": "Befly - 为 Bun 专属打造的 JavaScript API 接口框架核心引擎",
7
7
  "keywords": [