OpenArkStudio/ARK

Bug: AFCNetClientService::OnServerNotify

Closed this issue · 4 comments

In this section, the CreateClusterClient function will never return a successful result.
https://github.com/ArkNX/ARK/blob/7053635f18f5c25408f0c244dd5269693aa5b902/src/plugin/net/src/AFCNetClientService.cpp#L409-L415

This is due to the fact that inside the "CreateClusterClient" there is a similar check "ArkBusRelationType :: BRT_DIRECT"
https://github.com/ArkNX/ARK/blob/7053635f18f5c25408f0c244dd5269693aa5b902/src/plugin/net/src/AFCNetServiceManagerModule.cpp#L157-L164

In other words, our server will not simultaneously have 2 types of connection
Perhaps I don’t understand something?

The first code section means the connection type is BRT_WAIT_NOTIFY, the relation in the configuration file, bus_relation.xml. It's the notify msg process function.

The second section means to start the client that the connection type is BRT_DIRECT.

I think the logic is right.

Can connection_type be both BRT_WAIT_NOTIFY and BRT_DIRECT at the same time?
If not, then you better check this moment

No, just have one type. either BRT_DIRECT or BRT_WAIT_NOTIFY.

I get your point. You wanna let me check more.

But all notify type will not be started in the msg callback function, the msg sender will ensure this.

Don't worry, after using service discovery, you will never see the connection type enum.

this connection type is removed in the new design that using consul as the service discovery center.