[Yunq] Release server cap on destructor.
This commit is contained in:
parent
43d7bfa7ad
commit
96a2f74e14
14 changed files with 123 additions and 8 deletions
|
|
@ -29,6 +29,12 @@ void {{interface.name}}ServerBaseThreadBootstrap(void* server_base) {
|
|||
(({{interface.name}}ServerBase*)server_base)->ServerThread();
|
||||
}
|
||||
|
||||
{{interface.name}}ServerBase::~{{interface.name}}ServerBase() {
|
||||
if (endpoint_ != 0) {
|
||||
check(ZCapRelease(endpoint_));
|
||||
}
|
||||
}
|
||||
|
||||
glcr::ErrorOr<{{interface.name}}Client> {{interface.name}}ServerBase::CreateClient() {
|
||||
uint64_t client_cap;
|
||||
RET_ERR(ZCapDuplicate(endpoint_, ~(kZionPerm_Read), &client_cap));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue