jcelliott/turnpike

client.Unregister missing in v2

Closed this issue · 3 comments

Hello,

I am missing the client.Unregister function.
The server doesn't unregister a procedure if a client leaves the realm or closes the connection.
If a client restarts it fails upon sending register since the procedure is already registered.

I also can't send messages since most of the required client functions are private.
I will probably create a pull request with the client.Unregister function implementation.

A pull request would be great! Turnpike is close to being finished but I haven't had much time to work on it lately. I should be able to put some time into it in the next couple weeks.

#86 implemented part of this, but the router/dealer still needs to remove the registration if the client disconnects.

When a client disconnects, the realm now calls.

                        r.Dealer.RemoveSession(sess)
                        r.Broker.RemoveSession(sess)