Comments (3)
@liwei0705 你说的是Client.State.disconnected吗?这个字段是用来保存断开连接的时间,用这个来判断是否断开连接可能不太合适。建议你根据Clinet.Net.Conn来判断,先判断其为不为空,如果不为空,则判断下这个net.Conn是否是closed.
from server.
@liwei0705 你说的是Client.State.disconnected吗?这个字段是用来保存断开连接的时间,用这个来判断是否断开连接可能不太合适。建议你根据Clinet.Net.Conn来判断,先判断其为不为空,如果不为空,则判断下这个net.Conn是否是closed.
Thanks. Conn的判定也比较复杂,所以我改用OnDisconnect Hook + 自定义Map处理了...
from server.
这样更好,尽量让hook和server不要耦合在一起。
from server.
Related Issues (20)
- how to override payload when do message inceptor?
- Got nil exception when inceptor publish HOT 4
- Can not get onPublish called after set Inline Client HOT 10
- invalid client status which loaded from storage. HOT 6
- consume very slow when Inflights to many HOT 4
- Packet encoding optimization HOT 1
- Data race in buffer with v2.4.3 HOT 4
- Client unsubscribe topic have problem HOT 1
- Version is "2.4.1" while the package version is v2.4.3 HOT 2
- message does not save at session when client is disconnect HOT 21
- OnACLCheck BUG HOT 11
- How to enable storage simplify HOT 16
- How to disable log HOT 1
- How to allow specific username to read/write on a specific topic, and denied enything else? HOT 1
- After enabled badger, the vlog file up to 700M one day and 4GB one week HOT 9
- Race condition when running the redis example HOT 4
- 作者您好,请帮忙关注一下这个问题 HOT 3
- Hi, what is the simplest way to make messages can be restored when server cut off? HOT 5
- [badgerdb] vlog growing unbounded - consider adding GC and exposing options HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.