This commit is contained in:
Redkale
2020-06-07 22:11:49 +08:00
parent ecf831c0f5
commit b6a3adb21c

View File

@@ -164,6 +164,11 @@ public abstract class Sncp {
Field ts = service.getClass().getDeclaredField(FIELDPREFIX + "_messageagent");
ts.setAccessible(true);
ts.set(service, messageAgent);
if (service instanceof WebSocketNode) {
Field c = WebSocketNode.class.getDeclaredField("messageAgent");
c.setAccessible(true);
c.set(service, messageAgent);
}
} catch (Exception e) {
throw new RuntimeException(service + " not found " + FIELDPREFIX + "_messageagent");
}