fix: 增加容错
This commit is contained in:
1 parent
2536e1ae6a
commit
77b51a072d
2 files changed
+9
-2
No files matched your search
+1
-1
Submodule src/core updated: eec6f2a5c0...4e242a5850.
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user