Implement hook to close EventSource on TCP disconnect.