heartbeat_time independent from elapse_time

When socketio.wait is used in polling-mode, heartbeat is never sent. This patch fixes this issue.