internal void OnSessionException(Session sender, Exception exception) { if(ExceptionListener != null) { try { ExceptionListener(exception); } catch { sender.Close(); } } }