A Lawrence woman who was shot by her boyfriend had filed a restraining order against him before the shooting, but police said a computer glitch prevented it from being served promptly.

On Tuesday, Antonio Gonzalez allegedly shot his girlfriend, Yenny Santos, starting a standoff with police that ended when Gonzalez killed himself, The Associated Press reported. Santos survived and remained in critical condition after the shooting. 

RELATED: Four robbery suspects in custody after standoff in Dorchester home

One day earlier, Santos, 36, took out a restraining order against her boyfriend after he had allegedly threatened her life because he believed she had cheated on him, the Boston Herald stated.

The restraining order was granted by a judge at 12:43 p.m. on Monday, and it was faxed to Lawrence police at 1:38 p.m., but authorities said it did not reach an official email account until Tuesday morning, two hours before gunfire at Gonzalez’s apartment started the police standoff that ended with his death, the Herald added.

Police Chief James Fitzpatrick said that police had to serve 24 other restraining orders on that same day, the AP reported, adding that police typically serve restraining orders as quickly as possible.

RELATED: Man arraigned in police standoff that ended in fire

“I wish there was some other way of getting notification,” Fitzpatrick was quoted by the Herald, adding that the system had never malfunctioned for hours as it did in this case. “We are looking into what caused the problem.”