Adding event handling for ConnectionManager