增加额外日志
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2025-09-19 17:57:16 +08:00
parent 64ef4ea0f2
commit e63d6ba652
1 changed files with 10 additions and 21 deletions

View File

@ -171,6 +171,7 @@ namespace IRaCIS.Core.SCP.Service
_releasedNormally = true;
Log.Logger.Information($"进入释放连接请求 {_releasedNormally}");
}
await SendAssociationReleaseResponseAsync();
@ -251,38 +252,26 @@ namespace IRaCIS.Core.SCP.Service
{
var _studyRepository = _serviceProvider.GetService<IRepository<SCPStudy>>();
/* nothing to do here */
//奇怪的bug 上传的时候用王捷修改的影像会关闭重新连接导致检查id 丢失,然后状态不一致
if (exception == null)
if (exception == null || _releasedNormally == false)
{
//客户端断网,恢复后,也是没有异常的,估计是超时走了关闭
if (_releasedNormally == true)
await _studyRepository.BatchUpdateNoTrackingAsync(t => _SCPStudyIdList.Contains(t.Id), u => new SCPStudy() { IsUploadFinished = true, IsUploadFaild = true });
//记录日志
await AddUploadLogAsync();
}
else
{
//将检查设置为传输结束
await _studyRepository.BatchUpdateNoTrackingAsync(t => _SCPStudyIdList.Contains(t.Id), u => new SCPStudy() { IsUploadFinished = true, IsUploadFaild = false });
}
else
{
await _studyRepository.BatchUpdateNoTrackingAsync(t => _SCPStudyIdList.Contains(t.Id), u => new SCPStudy() { IsUploadFinished = true, IsUploadFaild = true });
//记录日志
await AddUploadLogAsync();
}
}
else
{
await _studyRepository.BatchUpdateNoTrackingAsync(t => _SCPStudyIdList.Contains(t.Id), u => new SCPStudy() { IsUploadFinished = true, IsUploadFaild = true });
//记录日志
await AddUploadLogAsync();
}
await _studyRepository.SaveChangesAndClearAllTrackingAsync();
Log.Logger.Warning($"连接关闭 {exception?.Message} {exception?.InnerException?.Message}");
Log.Logger.Warning($"连接关闭 {_releasedNormally} {exception?.Message} {exception?.InnerException?.Message}");
}