修复启动报错
This commit is contained in:
parent
db0044ec4c
commit
1f8015e8a2
@ -72,7 +72,7 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
|
||||
@Override
|
||||
@Async
|
||||
public void processRequest(RequestEvent requestEvent) {
|
||||
logger.info("\n收到请求:\n{}", requestEvent.getRequest());
|
||||
logger.debug("\n收到请求:\n{}", requestEvent.getRequest());
|
||||
String method = requestEvent.getRequest().getMethod();
|
||||
ISIPRequestProcessor sipRequestProcessor = requestProcessorMap.get(method);
|
||||
if (sipRequestProcessor == null) {
|
||||
|
@ -40,8 +40,7 @@ public class ZLMHttpHookSubscribe {
|
||||
private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>();
|
||||
|
||||
public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) {
|
||||
allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>())
|
||||
.put(hookResponse, event);
|
||||
allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()).put(hookResponse, event);
|
||||
}
|
||||
|
||||
public ZLMHttpHookSubscribe.Event getSubscribe(HookType type, JSONObject hookResponse) {
|
||||
|
@ -67,7 +67,7 @@ public class ZLMRunner implements CommandLineRunner {
|
||||
}
|
||||
mediaServerService.syncCatchFromDatabase();
|
||||
// 订阅 zlm启动事件, 新的zlm也会从这里进入系统
|
||||
hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started,null,
|
||||
hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started,new JSONObject(),
|
||||
(MediaServerItem mediaServerItem, JSONObject response)->{
|
||||
ZLMServerConfig zlmServerConfig = JSONObject.toJavaObject(response, ZLMServerConfig.class);
|
||||
if (zlmServerConfig !=null ) {
|
||||
@ -79,7 +79,7 @@ public class ZLMRunner implements CommandLineRunner {
|
||||
});
|
||||
|
||||
// 订阅 zlm保活事件, 当zlm离线时做业务的处理
|
||||
hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_keepalive,null,
|
||||
hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_keepalive,new JSONObject(),
|
||||
(MediaServerItem mediaServerItem, JSONObject response)->{
|
||||
String mediaServerId = response.getString("mediaServerId");
|
||||
if (mediaServerId !=null ) {
|
||||
|
Loading…
Reference in New Issue
Block a user