Comet Server Push Technology node Server Problems Urgently Urgently Online

  node.js, question
javascriptClient code:
 function longConnect(){
 var source = new EventSource('/contact/comet');
 source.onmessage=function(event)
 bracket
 console.log(2);
 console.log(event.data);
 };
 bracket
 Server code
 exports.comet = function(req, res, next){
 res.set('Content-Type', 'text/event-stream');
 
 setInterval(function(){
 
 res.send("1");
 },3000);
 
 };

Error reporting:
http.js:690
throw new Error(‘Can\’t set headers after they are sent.’);

What should I do under the express framework?

I already know why