Skip to content
Snippets Groups Projects
Commit e0a1fdfa authored by Karishma Chadha's avatar Karishma Chadha
Browse files

Add API to close connection and clean up cloud provider.

parent 25b8fac3
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,26 @@ class CloudProvider { ...@@ -99,6 +99,26 @@ class CloudProvider {
this.writeToServer('set', name, value); this.writeToServer('set', name, value);
} }
/**
* Closes the connection to the web socket and clears the cloud
* provider of references related to the cloud data project.
*/
requestCloseConnection () {
this.connection.close();
this.clear();
}
/**
* Clear this provider of references related to the project
* and current state.
*/
clear () {
this.connection = null;
this.vm = null;
this.username = null;
this.projectId = null;
}
} }
export default CloudProvider; export default CloudProvider;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment