Bug Fix & Improvements

- Improve logs
- Fix fetch message not working
This commit is contained in:
Linloir 2022-10-20 10:44:09 +08:00
parent 0aa72b5dc3
commit 5909308475
No known key found for this signature in database
GPG Key ID: 58EEB209A0F2C366
2 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/*
* @Author : Linloir
* @Date : 2022-10-06 15:44:16
* @LastEditTime : 2022-10-19 14:41:56
* @LastEditTime : 2022-10-20 01:00:24
* @Description :
*/
@ -121,9 +121,15 @@ void main(List<String> arguments) async {
);
for(var controller in targetControllers) {
try {
print('[L] [MSGFOWARD]-----------------------');
print('[L] Forwarding message to ${controller.socket.remoteAddress}:${controller.socket.remotePort}');
controller.outStream.add(forwardResponse);
} catch(e) {
print(e);
print('[E] [EXCEPTION]-----------------------');
var token = controllerMap[controller];
controllerMap.remove(controller);
tokenMap[token]?.remove(controller);
continue;
}
}
//Update Fetch Histories
@ -153,6 +159,7 @@ void main(List<String> arguments) async {
var token = controllerMap[controller];
controllerMap.remove(controller);
tokenMap[token]?.remove(controller);
continue;
}
}
//Update Fetch Histories

View File

@ -1,7 +1,7 @@
/*
* @Author : Linloir
* @Date : 2022-10-06 16:15:01
* @LastEditTime : 2022-10-18 14:12:22
* @LastEditTime : 2022-10-20 10:40:50
* @Description :
*/
@ -358,7 +358,7 @@ class DataBaseHelper {
//Fetch unfetched messages
var unfetchMsgQueryResult = await _database.query(
'msgs join msgfiles on msgs.md5encoded = msgfiles.msgmd5',
'msgs left outer join msgfiles on msgs.md5encoded = msgfiles.msgmd5',
columns: [
'msgs.userid as userid',
'msgs.targetid as targetid',