fix, is_subed()

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-11-29 23:19:29 +08:00
parent 19e8ca6c06
commit e146c2606f

View File

@ -99,6 +99,7 @@ impl<T: Subscriber + From<ConnInner>> Service for ServiceTmpl<T> {
fn is_subed(&self, id: i32) -> bool { fn is_subed(&self, id: i32) -> bool {
self.0.read().unwrap().subscribes.get(&id).is_some() self.0.read().unwrap().subscribes.get(&id).is_some()
|| self.0.read().unwrap().new_subscribes.get(&id).is_some()
} }
fn on_subscribe(&self, sub: ConnInner) { fn on_subscribe(&self, sub: ConnInner) {