Reference: Siyar A’laam an-Nubalaa. – Volume 13, Page 330-331
It was narrated in the book “Dhamm al-Kalaam”:
Sahl was asked:
Until when will a man [continue to] write hadeeth? He said: Until he dies, and the remaining ink will [then] be poured into his grave.