roslibjs icon indicating copy to clipboard operation
roslibjs copied to clipboard

No 'close' event when rosbridge_server terminates in roslibjs node version

Open dwlee opened this issue 11 years ago • 2 comments

I have used roslibjs in node. In case of using previous version(0.8.3), when node server disconnected with rosbridge_server, the node server received the 'close' event. But after I updated roslibjs to 0.9.0, node server does not received close event in above same situation .Is it intended?

dwlee avatar Nov 13 '14 03:11 dwlee

@dwlee Hey, I'm having the same issue, did you find a solution for this?

elizatlawy avatar Nov 03 '22 13:11 elizatlawy

It depends whether you are running in a node of browser environment, which Ros object is used. But the connection is always handled by an external socket. So you could manually subscribe to the events of the socket(ros.socket), to see whether the socket provides a close event in such a situation.

I will have to take a better look, when the Ros object does emit events. But I don't have time for it any time soon. So you are free to do some research yourself.

MatthijsBurgh avatar Nov 03 '22 14:11 MatthijsBurgh