Tidied up code, made changes for benchmarking.

This commit is contained in:
Tim Beatham
2023-10-30 16:49:02 +00:00
parent 928f6af9ac
commit 579426e32d
4 changed files with 38 additions and 9 deletions

View File

@ -31,8 +31,9 @@ func (n *IpcHandler) CreateMesh(args *ipc.NewMeshArgs, reply *string) error {
WgPort: args.WgPort,
Endpoint: args.Endpoint,
})
*reply = meshId
return nil
return err
}
func (n *IpcHandler) ListMeshes(_ string, reply *ipc.ListMeshReply) error {
@ -51,6 +52,10 @@ func (n *IpcHandler) ListMeshes(_ string, reply *ipc.ListMeshReply) error {
func (n *IpcHandler) JoinMesh(args ipc.JoinMeshArgs, reply *string) error {
peerConnection, err := n.Server.ConnectionManager.GetConnection(args.IpAdress)
if err != nil {
return err
}
client, err := peerConnection.GetClient()
if err != nil {