You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm here to ask a question about the SignalR project so it's really an issue, I don't know if it's correct place to ask that. Feel free to close it if it's not.
I have noticed something with the .NET Framework SignalR implementation, i'm using the latest version (2.41.0) : Sometimes the HttpContext.Current is not null and sometimes it's null. For even like OnReconnected, OnDisconnected it seems to always be null, but when actually executing a method of a giving hub it seems to not be null (so the HttpContext.Current is filled). It's important to me to confirm that because i'm using Castle Windsor as a DI container, and i registered my Services as HybridPerWebRequestTransient (when HttpContext exists the lifestyle will be PerWebRequest and where not it will be Transient). And in production we noticed some memory leak because of that : Transient object are never released by castle because castle doesn't know where to release them. Well again it's not a SignalR issue, i would say.
So my question is : Can you please confirm me that the HttpContext.Current is only set/filled/not null only when calling a method of a Hub, and it's not set/not filled/null on events like OnReconnected and OnDisconnected of the Hub ... Also if can someone tell my why that would be great.
Thank you for reading me !
The text was updated successfully, but these errors were encountered:
With the above method, you should have access to the HttpContext inside OnDisconnected and OnReconnected since we capture the request on connection start.
Hi,
I'm here to ask a question about the SignalR project so it's really an issue, I don't know if it's correct place to ask that. Feel free to close it if it's not.
I have noticed something with the .NET Framework SignalR implementation, i'm using the latest version (2.41.0) : Sometimes the HttpContext.Current is not null and sometimes it's null. For even like OnReconnected, OnDisconnected it seems to always be null, but when actually executing a method of a giving hub it seems to not be null (so the HttpContext.Current is filled). It's important to me to confirm that because i'm using Castle Windsor as a DI container, and i registered my Services as HybridPerWebRequestTransient (when HttpContext exists the lifestyle will be PerWebRequest and where not it will be Transient). And in production we noticed some memory leak because of that : Transient object are never released by castle because castle doesn't know where to release them. Well again it's not a SignalR issue, i would say.
So my question is : Can you please confirm me that the HttpContext.Current is only set/filled/not null only when calling a method of a Hub, and it's not set/not filled/null on events like OnReconnected and OnDisconnected of the Hub ... Also if can someone tell my why that would be great.
Thank you for reading me !
The text was updated successfully, but these errors were encountered: