rtc

minimal webrtc client
git clone https://git.ce9e.org/rtc.git

commit
88ef684dfc1f06ab665fcf395e2b7af78d6232c4
parent
04da858fe8564c85333bc59443e79e4370b28940
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-03-23 07:57
patch: already send new request while processing old one

Diffstat

M patch.js 8 ++++----

1 files changed, 4 insertions, 4 deletions


diff --git a/patch.js b/patch.js

@@ -19,12 +19,12 @@
   19    19 	};
   20    20 
   21    21 	// FIXME: prefer server send events
   22    -1 	// FIXME: avoid gaps to avoid dropping messages
   23    22 	var listen = function(url, fn) {
   24    -1 		return fetch(url)
   -1    23 		p = fetch(url);
   -1    24 		p.finally(() => listen(url, fn));
   -1    25 		return p
   25    26 			.then(r => r.text())
   26    -1 			.then(data => fn(JSON.parse(data)))
   27    -1 			.then(x => listen(url, fn));
   -1    27 			.then(data => fn(data && JSON.parse(data)))
   28    28 	};
   29    29 
   30    30 	window.patch = {