I writing a web application that uses Clover's JS SDK and I'm having trouble closing the connection opened to communicate with the device after I'm done using it.
I'm using the Clover#close function https://rawgit.com/clover/remote-pay-...
I'm doing something equivalent to the following
clover = new Clover()
clover.initDeviceConnection(function(error) {
clover.close()
})
But even though the clover.close() is ran and clover.isOpen() returns false I keep receiving the following on the logs afterwards:
VM189895:2274 deviceSocket.onmessage
VM189895:125 Connection Ok
VM189895:2274 deviceSocket.onmessage
VM189895:125 Connection Ok
VM189895:2274 deviceSocket.onmessage
VM189895:125 Connection Ok
Also after having this issue I noticed that this other issue comes up http://devask.clover.com/question/242... Basically the any new Clover instance doesn't work after I closed the first one, only refreshing the browser fix it.