2881099 / FreeIM

.NETCore websocket 实现简易、高性能、集群即时通讯组件,支持点对点通讯、群聊通讯、上线下线事件消息等众多实用性功能.
MIT License
1.45k stars 430 forks source link

引入Nuget包和直接拉源码,链接WebSocket问题 #23

Closed YCSiTong closed 2 years ago

YCSiTong commented 4 years ago

您好,我自己在之前使用Nuget包的时候,正常的一个使用没问题的,但是我从git上拉您的源码下来使用后,我前端链接Websocket时,后端就会说资源以释放,不可访问.想请教一下是需要哪里配置吗.

2881099 commented 4 years ago

是一样呢,具体是什么错误

YCSiTong commented 4 years ago

System.ObjectDisposedException:“Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.

2881099 commented 4 years ago

这个是注入问题,被释放了,检查注入方式

YCSiTong commented 4 years ago

可是您的这个不是直接写中间件就好了吗,是要把那三个文件都单例注入是吗

2881099 commented 4 years ago

按照demo来

YCSiTong commented 4 years ago

我找到问题了,因为我在您的事件总线 里面加入了两个事件,我需要在用户上线下线的时候执行对应的一些业务处理,谢谢您

YCSiTong commented 4 years ago

请问您有一个qq群之类的吗

2881099 commented 4 years ago

只开了freesql orm群,其他开源库没有qq群