null catch while closing socket