mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
lovely priority inversions
This commit is contained in:
parent
9c03c65e07
commit
b8481e32ba
|
@ -381,6 +381,18 @@ function up2k_init(have_crypto) {
|
|||
while (true) {
|
||||
var mou_ikkai = false;
|
||||
|
||||
if (st.todo.handshake.length > 0 &&
|
||||
st.busy.handshake.length == 0 && (
|
||||
st.todo.handshake[0].t3 || (
|
||||
handshakes_permitted() &&
|
||||
st.busy.upload.length < parallel_uploads
|
||||
)
|
||||
)
|
||||
) {
|
||||
exec_handshake();
|
||||
mou_ikkai = true;
|
||||
}
|
||||
|
||||
if (handshakes_permitted() &&
|
||||
st.todo.handshake.length > 0 &&
|
||||
st.busy.handshake.length == 0 &&
|
||||
|
@ -688,6 +700,8 @@ function up2k_init(have_crypto) {
|
|||
ebi('f{0}p'.format(t.n)).innerHTML = 'hash {0}, up {1} MB/s'.format(
|
||||
spd1.toFixed(2), spd2.toFixed(2));
|
||||
}
|
||||
else t.t3 = undefined;
|
||||
|
||||
tasker();
|
||||
}
|
||||
else {
|
||||
|
@ -766,7 +780,7 @@ function up2k_init(have_crypto) {
|
|||
if (t.postlist.length == 0) {
|
||||
t.t3 = new Date().getTime();
|
||||
ebi('f{0}t'.format(t.n)).innerHTML = 'verifying';
|
||||
st.todo.handshake.push(t);
|
||||
st.todo.handshake.unshift(t);
|
||||
}
|
||||
tasker();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue