Thank you for your post, and I apologize for the late reply.
Code 22 is an informational event and it signifies a client closing a connection. Yes, it will appear when a server side script ends.
Code 30 is a warning that a client is no longer responding and the connection is closed.
For a list of codes, please see Knowledge Base Article #7275: