UDP closes correctly in tab activity