优化回调设置方式
parent
9c6765d44e
commit
f357bece62
|
@ -193,12 +193,10 @@ public class RedisRpcConfig implements MessageListener {
|
|||
}
|
||||
|
||||
private void setCallback(long key, CommonCallback<RedisRpcResponse> callback) {
|
||||
if (!callbacks.containsKey(key)) {
|
||||
// TODO 如果多个上级点播同一个通道会有问题
|
||||
callbacks.put(key, callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void removeCallback(long key) {
|
||||
callbacks.remove(key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue