annotate .hgtags @ 165:59e62710cbb5

rlgwebd.js: prevent races when reading ttyrecs. DglSession objects read a 12-byte TTYREC header, extract therefrom the length of the data chunk, and then read the data. In between these two reads, the file watcher could trigger another readchunk() invocation, which might attempt to read a header from the beginning of the data chunk. This usually results in expecting a data chunk of several GB and failing to create a Buffer for it. The race is remedied by setting a flag on the DglSession object whenever readchunk() is called, clearing it when both reads complete, and refusing to read if it is already set.
author John "Elwin" Edwards
date Wed, 07 Jan 2015 13:18:35 -0500
parents 56da59b343ca
children 60605bacde36
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
e93751ff7815 Added tag beta1 for changeset ab82ae1ba793
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff changeset
1 ab82ae1ba793094e27852f6b0f2914f299d0e42f beta1
69
0c16f07135dd Added tag beta2 for changeset 4728fc71bbda
John "Elwin" Edwards <elwin@sdf.org>
parents: 53
diff changeset
2 4728fc71bbdaee0bcfd7059d8bced74790faefbc beta2
80
7eb4cc9dfa94 Added tag beta3 for changeset 3fd410c52a61
John "Elwin" Edwards <elwin@sdf.org>
parents: 69
diff changeset
3 3fd410c52a614138d0bb76c7e6f9880144e66b3c beta3
99
2880cc4372bd Added tag beta4 for changeset 75a016c49076
John "Elwin" Edwards <elwin@sdf.org>
parents: 80
diff changeset
4 75a016c49076a724f17df0d0aac4d6acedf4467f beta4
115
7ef3a1a084b9 Added tag beta5 for changeset 86c1b79cf662
John "Elwin" Edwards <elwin@sdf.org>
parents: 99
diff changeset
5 86c1b79cf6628843897bb88477c6807881262b17 beta5
136
56da59b343ca Added tag beta6 for changeset e4f27a093d1e
John "Elwin" Edwards <elwin@sdf.org>
parents: 115
diff changeset
6 e4f27a093d1e7628df7ff35f41cb946cccfa5360 beta6