It seems that python client is always opens owner connection with empty uuid's. This causes server to give new uuid to it every time owner connection is broken.
Since a new endpoint can not be registered to server for an existing connection. Old endpoint will be taking into account on server. And this result with endpoint deleted and connection closed second time.
Instead, pyhton client should always send existing uuid's to server when authenticating.