Optimze socket event source attach.