A man in China who reportedly sniffed his dirty socks each day learned the hard way that his habit is apparently a health danger.

The man, identified only as Peng by the Daily Mail, reportedly developed a habit of sniffing his socks each day after work. But this unusual custom allegedly landed him in the hospital after the Zhangzhou resident complained of chest pains, tightness in his chest and a cough, Science Alert reported.

Initially, doctors at Zhangzhou's 909 Hospital suspected that Peng, 37, had pneumonia. But when his symptoms persisted, doctors re-questioned the man and he eventually admitted he was “addicted to smelling his socks that he had been wearing,” he said, according to the Daily Mail, which cited local Chinese media.

ST. LOUIS WOMAN, 18, SERENADED BY JASON MRAZ DIES WHILE WAITING FOR NEW LUNGS

Physicians would later discover the man had a serious fungal infection in his lungs, more formally known as pulmonary fungal disease. The infection was likely caused when the man inhaled the fungal spores found in the dirty socks, Science Alert reported.

Peng's condition may have been worsened by his “lack of rest,” one of the man’s doctors, Mai Zhuanying, reportedly told Fujian Daily, according to the Daily Mail.

"The infection could also be attributed to the patient's lack of rest at home as he had [been] looking after his child, leading to a weaker immune system," Zhuanying said.

Pulmonary fungal disease, or Aspergillosis, is an infection caused by a certain kind of mold.

"The illnesses resulting from aspergillosis usually affect the respiratory system, but their signs and severity vary greatly,” the Mayo Clinic explains online.

DAD CLAIMS FOOD POISONING LED TO RARE PARALYZING DISORDER

“The mold that triggers the illnesses, aspergillus, is everywhere — indoors and outdoors. Most strains of this mold are harmless, but a few can cause serious illnesses when people with weakened immune systems, underlying lung disease or asthma inhale their spores,” the Mayo Clinic continued, noting the infection can cause wheezing, shortness of breath, or cause the infected person to cough up blood, among other symptoms.

Luckily, Peng is expected to make a full recovery, the Daily Mail reported.