@@ -128,7 +128,7 @@ public static async void WebSocketHandler(HttpListenerContext ctx) {
128128 return ;
129129 }
130130
131- IEnumerable < Issue > filtered = issues . Where ( o => o . timestamp > lastTimestamp ) ;
131+ IEnumerable < Issue > filtered = issues ? . Where ( o => o . timestamp > lastTimestamp ) ;
132132
133133 if ( filtered . Any ( ) ) {
134134 byte [ ] bytes = JsonSerializer . SerializeToUtf8Bytes ( filtered . Select ( o => new {
@@ -232,11 +232,11 @@ public static void ScanDevice(Database.Entry device) {
232232 ipString = ip . value . Split ( ';' ) . Select ( o => o . Trim ( ) ) . ToArray ( ) [ 0 ] ;
233233 }
234234
235- if ( CheckCpuLifeline ( device , ipString , out Issue ? cpuIssue ) ) {
235+ if ( CheckCpuLifeline ( device , ipString , out Issue ? cpuIssue ) && cpuIssue . HasValue ) {
236236 issues . Add ( cpuIssue . Value ) ;
237237 }
238238
239- if ( CheckMemoryLifeline ( device , ipString , out Issue ? memoryIssue ) ) {
239+ if ( CheckMemoryLifeline ( device , ipString , out Issue ? memoryIssue ) && memoryIssue . HasValue ) {
240240 issues . Add ( memoryIssue . Value ) ;
241241 }
242242
@@ -246,11 +246,11 @@ public static void ScanDevice(Database.Entry device) {
246246 }
247247 }
248248
249- if ( CheckDiskIOLifeline ( device , ipString , out Issue ? diskIoIssue ) ) {
249+ if ( CheckDiskIOLifeline ( device , ipString , out Issue ? diskIoIssue ) && diskIoIssue . HasValue ) {
250250 issues . Add ( diskIoIssue . Value ) ;
251251 }
252252
253- if ( CheckNicSpeed ( device , ipString , out Issue ? nicSpeedIssue ) ) {
253+ if ( CheckNicSpeed ( device , ipString , out Issue ? nicSpeedIssue ) && nicSpeedIssue . HasValue ) {
254254 issues . Add ( nicSpeedIssue . Value ) ;
255255 }
256256
@@ -598,7 +598,7 @@ public static bool CheckDiskSpaceLifeline(Database.Entry device, string host, ou
598598 List < ( long timestamp , double percentUsed ) > usageData = diskEntry . Value ;
599599
600600 if ( usageData . Count == 0 ) { continue ; }
601- if ( CheckDiskSpace ( device . filename , host , 100 - usageData [ ^ 1 ] . percentUsed , diskEntry . Key , out Issue ? diskIssue ) ) {
601+ if ( CheckDiskSpace ( device . filename , host , 100 - usageData [ ^ 1 ] . percentUsed , diskEntry . Key , out Issue ? diskIssue ) && diskIssue . HasValue ) {
602602 issuesList . Add ( diskIssue . Value ) ;
603603 continue ;
604604 }
@@ -776,7 +776,8 @@ public static bool CheckDomainUser(Database.Entry user, out Issue[] issues, Seve
776776 isUser = true ,
777777 } ) ;
778778 }
779- else {
779+
780+ if ( result is not null ) {
780781 bool isDisabled = false ;
781782 if ( severityThreshold <= SeverityLevel . info
782783 && result . Properties [ "userAccountControl" ] . Count > 0
0 commit comments