fix close server's bug in husky