Sometimse EndReceive return 0 byte but socket is not closed. Try to fix this behaviour