Calling listener method on connection close