www: Close socket on page unload