关闭事件流

可以使用 EventSource.close() 方法关闭到服务器的事件流

var eventSource = new EventSource("api/my-events");
// do things ...
eventSource.close(); // you will not receive anymore events from this object

.close() 方法什么都不做,流已经关闭了。