sj: fix infinity loop by connection closed
Makefile: clean up