Skip to content

Commit

Permalink
Add missing close method. (jbmusso#94)
Browse files Browse the repository at this point in the history
Allow the client to close the connection.
  • Loading branch information
vicneanschi authored and jbmusso committed Nov 27, 2017
1 parent 7cb7544 commit 3b62272
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gremlin-client/src/WebSocketGremlinConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export default class WebSocketGremlinConnection extends EventEmitter {
handleMessage(message) {
this.emit('message', message);
}


close() {
this.ws.terminate();
}

onClose(event) {
this.open = false;
this.emit('close', event);
Expand Down

0 comments on commit 3b62272

Please sign in to comment.