mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
Merge origin/main into dev: sync bug fixes from main
Merges 4 PRs from main: - PR#15: Fix ffmpeg spawn failure causing infinite retry loop - PR#16: Fix Docker restart crash (respect autoStart flag, persist identity) - PR#17: Add missing "play" script to package.json - PR#18: Add detailed update/upgrade instructions to README Conflict resolution in src/data/database.ts: - Combined dev's serverProtocol/ts6ApiKey fields with main's identity field - Extended migrateSchema() to also migrate serverProtocol and ts6ApiKey columns - Updated SQL schema and upsert query to include all three new columns
This commit is contained in:
commit
419911b78b
8 files changed
+201
-20
No files matched your search
@@ -77,6 +77,18 @@ export class TS3Client extends EventEmitter {
|
||||
}
|
||||
|
||||
async connect(): Promise<void> {
|
||||
// Clean up any existing connection before creating a new one
|
||||
if (this.client) {
|
||||
this.logger.info("Cleaning up previous connection before reconnecting");
|
||||
try {
|
||||
await this.client.disconnect();
|
||||
} catch {
|
||||
// Ignore errors during cleanup
|
||||
}
|
||||
this.client = null;
|
||||
this.clientId = 0;
|
||||
}
|
||||
|
||||
const addr = `${this.options.host}:${this.options.port}`;
|
||||
|
||||
// Detect or use forced protocol
|
||||
|
||||
Reference in new issue
Block a user