Phase 5a: persistent websocket with request ids and reconnect
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/push Build encountered an error
Client (ts/network_ts.ts): one WebSocket per page. Commands queue and go out one at a time with a client-chosen id; the response is matched on the echoed id (or to the in-flight request for older servers). 12 s timeout per request, exponential-backoff reconnect (0.5 s to 10 s), the in-flight request is retried after a reconnect, and log polls are de-duplicated so they cannot pile up behind a stalled connection. The old global flag that silently dropped any request made while another was in flight is gone. Server (src/webserver.go): the /data/ handler now serves any number of commands on one connection (it used to break out of its loop after the first reply without closing the socket, leaving it open and deaf; the old client papered over that by opening a new socket per request). Connection closed on exit, request id echoed in the response. Test: TestWSServesMultipleCommandsPerConnection.
This commit is contained in:
@@ -3,7 +3,6 @@ var BULK_EDIT:Boolean = false
|
||||
var COLUMN_TO_SORT:number
|
||||
var SEARCH_MAPPING = new Object()
|
||||
var UNDO = new Object()
|
||||
var SERVER_CONNECTION = false
|
||||
var WS_AVAILABLE = false
|
||||
var ACTIVE_MENU_ID:string = ""
|
||||
var LAST_BULK_CHECKBOX:HTMLInputElement = null
|
||||
@@ -761,7 +760,6 @@ function sortSelect(elem) {
|
||||
|
||||
function updateLog() {
|
||||
|
||||
console.log("TOKEN")
|
||||
var server:Server = new Server("updateLog")
|
||||
server.request(new Object())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user