Fix NPE when messageEvent is null and Exception is thrown in event creation, in ConnectionThread