code and reason for close callback