title: Socket connection breaking frequently with flask-socketio
body: <p>I am using flask-socketio to make a socket connection from my python web server to the javascript client. I am able to establish the connection but it breaks in a while(5 seconds or so) with the error</p>
  
  <blockquote>
    <p>socket.io.min.js:2 WebSocket connection to
    'ws://localhost:5000/socket.io/?EIO=3&amp;transport=websocket&amp;sid=8ed663e14c6f47328b64f2d29a30d1cd'
    failed: Received a broken close frame containing invalid UTF-8.</p>
  </blockquote>
  
  <p>Server side code to send the message(calling this periodically, say every 5 seconds)</p>
  
  <pre><code>def send_message(result):
      # it will forward the message to all clients.
      print("sending message")
      socketio.send("Send working",  json=False)
  </code></pre>
  
  <p>Client side code to receive the message</p>
  
  <pre><code>socket.on('message', function (data) {
      console.log('message form backend ' + data);
  });
  </code></pre>
  
  <p>Somehow it breaks -> then nothing happens for a while -> then connect again automatically -> then breaks again. </p>
  
  <p>Can someone please help? Thanks a lot!</p>