trap socket close
wire connection status to plugin api