-
-
Notifications
You must be signed in to change notification settings - Fork 586
hotfix HttpContext NullReferenceException #1224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Compliance Guide 🔍(Compliance updated until commit 078d685)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 078d685
|
||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨No code suggestions found for the PR. |
|
reviewed |
|
Reviewed |
PR Type
Bug fix
Description
Fix NullReferenceException when HttpContext is unavailable
Replace direct HttpContext access with safe null-coalescing pattern
Use Context.GetHttpContext() for proper SignalR context retrieval
Diagram Walkthrough
File Walkthrough
SignalRHub.cs
Safe HttpContext access with null-coalescing operatorssrc/Plugins/BotSharp.Plugin.ChatHub/SignalRHub.cs
_context.HttpContextaccess withContext.GetHttpContext()method call?.) for safe property access onpotentially null HttpContext
conversationIdusing safe query parameter retrieval withFirstOrDefault()SignalR connections