Add disconnect method (#899)

This commit is contained in:
Dima 2020-05-28 20:19:26 +03:00 committed by GitHub
parent 9d4190ae2c
commit d894913dbb
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "fluence",
"version": "0.5.2",
"version": "0.5.3",
"description": "the browser js-libp2p client for the Fluence network",
"main": "./dist/fluence.js",
"typings": "./dist/fluence.d.ts",

View File

@ -224,6 +224,10 @@ export class FluenceClient {
}
}
async disconnect(): Promise<void> {
return this.connection.disconnect();
}
/**
* Establish a connection to the node. If the connection is already established, disconnect and reregister all services in a new connection.
*