added new delegate for socket connection closed