visu plugin: improve closing socket