quamotion / remoteviewing

RemoteViewing is a .NET-native VNC client and server library.
Other
261 stars 79 forks source link

Logger ArgumentNullException VncServerSession #168

Open Varmod opened 1 year ago

Varmod commented 1 year ago

Hi,

I'm running a VncServerSession and when a client disconnects I get a: System.ArgumentNullException: 'Value cannot be null. (Parameter 'logger')

Stacktrace: Microsoft.Extensions.Logging.Abstractions.dll!Microsoft.Extensions.Logging.LoggerExtensions.Log(Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, object[] args RemoteViewing.dll!RemoteViewing.Vnc.Server.VncServerSession.OnClosed() RemoteViewing.dll!RemoteViewing.Vnc.Server.VncServerSession.ThreadMain() System.Private.CoreLib.dll!System.Threading.Thread.StartCallback()

I use the parameterless VncServerSession constructor that isn't passed a Ilogger implementation. On a quick glance it looks like OnClosed method is missing a null check for the logger?