leave browser to close socket on unload