Skip to content

Commit

Permalink
fix(binding-coap): prevent resource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Sep 21, 2021
1 parent 9f350c5 commit 905596f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/binding-coap/src/coap-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default class CoapClient implements ProtocolClient {
}

public stop(): boolean {
// FIXME coap does not provide proper API to close Agent
this.agent.close();
return true;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/binding-coap/test/coap-client-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ class CoapClientTest {
return coapServer.stop();
})
.then(() => {
done();
coapServer.stop().then(() => {
done();
});
});
});
}
Expand Down
1 change: 0 additions & 1 deletion packages/binding-http/test/http-client-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* SPDX-License-Identifier: EPL-2.0 OR W3C-20150513
********************************************************************************/

/* eslint-disable @typescript-eslint/no-var-requires */
/**
* Protocol test suite to test protocol implementations
*/
Expand Down

0 comments on commit 905596f

Please sign in to comment.