fix: finish weixin login only after gateway restart
This commit is contained in:
@@ -468,7 +468,7 @@ async function _runLogin({ callId, timeoutMs, botType, emit, isAborted }) {
|
|||||||
_bumpOpenClawConfigTimestamp();
|
_bumpOpenClawConfigTimestamp();
|
||||||
_ensureWeixinStateOwnership();
|
_ensureWeixinStateOwnership();
|
||||||
log.info('weixin', `callId=${callId} login success accountId=${accountId} file=${filePath}`);
|
log.info('weixin', `callId=${callId} login success accountId=${accountId} file=${filePath}`);
|
||||||
emit({ action: 'finish', event: 'success', data: { accountId } });
|
emit({ action: 'progress', event: 'login_success', data: { accountId } });
|
||||||
emit({
|
emit({
|
||||||
action: 'progress',
|
action: 'progress',
|
||||||
event: 'gateway_restarting',
|
event: 'gateway_restarting',
|
||||||
@@ -479,9 +479,12 @@ async function _runLogin({ callId, timeoutMs, botType, emit, isAborted }) {
|
|||||||
});
|
});
|
||||||
const gatewayRestart = _restartGateway();
|
const gatewayRestart = _restartGateway();
|
||||||
emit({
|
emit({
|
||||||
action: 'event',
|
action: 'finish',
|
||||||
event: gatewayRestart.ok ? 'gateway_restart_succeeded' : 'gateway_restart_failed',
|
event: 'success',
|
||||||
data: gatewayRestart,
|
data: {
|
||||||
|
accountId,
|
||||||
|
gatewayRestart,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user