reset terminate event to fix bug preventing re-use of socket without destroying the class instance