Clear ID before closing EventSource

#1519