The invention relates to the field of pipe fitting manufacturing, in particular to a water-hammer arrestor. The water-hammer arrestor comprises a buffer tube body (1), a compressed air line (2), a pressure sensor (4), a high liquid-level sensor (5), a low liquid-level sensor (6), a drainage pipeline (7), and a buffer tube opening (9); one end of the buffer tube body (1) is provided with a blind tube of the buffer tube opening (9), and the closed end of the buffer tube body (1) is provided with the compressed air line (2) and the pressure sensor (4); and one position, close to the closed end, of the buffer tube body (1) is provided with the high liquid-level sensor (5), and one end, close to the buffer tube opening (9), of the buffer tube body (1) is provided with the low liquid-level sensor (6) and the drainage pipeline (7). Compared with the prior art, the water-hammer arrestor is simple in structure, low in cost, and convenient to use; and the water-hammer arrestor has good removingeffect, no maintenance is required, and the practicability is wide.