fix: 增加容错

This commit is contained in:
手瓜一十雪 committed 2024-06-24 12:03:49 +08:00
1 parent 2536e1ae6a
commit 77b51a072d
2 files changed
+9 -2

No files matched your search

Submodule src/core updated: eec6f2a5c0...4e242a5850.
+8 -1
View File
@@ -67,7 +67,14 @@ export async function sendMsg(peer: Peer, sendElements: SendMessageElement[], de
logDebug('发送消息id获取失败', e); logDebug('发送消息id获取失败', e);
returnMsg.id = 0; returnMsg.id = 0;
} }
deleteAfterSentFiles.map(f => fs.unlinkSync(f));
deleteAfterSentFiles.map((f) => {
try {
fs.unlinkSync(f);
} catch (e) {
logError('发送消息删除文件失败', e);
}
});
return returnMsg; return returnMsg;
} }