Do not assume a connection event will always have a connection.

On my instance "conn" provided by the connection event would sometimes be null (only when running under SSL), which crashes the server.

This change just ignores connection events for which conn is null.