Hi!
My issue is the following:
I'm currently implementing a connection between 2 different code into the same computer. So I have a server and a client.
I run the server and then the client. Then the server publish events which are read and execute by the client.
But when I stop the clients code the server code is crashing.
After test and investigations I found that the subscribers map[string][]*SubscribeArg map from the server object is not updated when the client is disconnected. If the client is not working any more the subscribers object is always the same.
So when I'm using server.HasClientSubscribed(&theArgs) its responding always true event after the disconnection of the client.
My workaround is to use:
rpcClient, _ := rpc.DialHTTPPath("tcp", ":2010", "/_client_bus_")
and check if it not nil before to make a publish
Is there a solution in order to update this map? Is there any another solution in order to avoid the crash of the code?
Hi! My issue is the following: I'm currently implementing a connection between 2 different code into the same computer. So I have a server and a client. I run the server and then the client. Then the server publish events which are read and execute by the client. But when I stop the clients code the server code is crashing.
After test and investigations I found that the
subscribers map[string][]*SubscribeArg
map from theserver
object is not updated when the client is disconnected. If the client is not working any more thesubscribers
object is always the same.So when I'm using
server.HasClientSubscribed(&theArgs)
its responding always true event after the disconnection of the client.My workaround is to use:
rpcClient, _ := rpc.DialHTTPPath("tcp", ":2010", "/_client_bus_")
and check if it notnil
before to make a publishIs there a solution in order to update this map? Is there any another solution in order to avoid the crash of the code?
Best regards !