Do the closure handshake before closing the data socket
fixed the disconnect reader menu item stalling the gui