mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
ignore dupe-chunk warnings; handshake takes care of it
This commit is contained in:
parent
d6b5351207
commit
765294c263
|
@ -141,11 +141,12 @@ class HttpSrv(object):
|
||||||
"shut({}): {}".format(fno, ex),
|
"shut({}): {}".format(fno, ex),
|
||||||
c="1;30",
|
c="1;30",
|
||||||
)
|
)
|
||||||
if ex.errno not in [10038, 10054, 107, 57, 9]:
|
if ex.errno not in [10038, 10054, 107, 57, 49, 9]:
|
||||||
# 10038 No longer considered a socket
|
# 10038 No longer considered a socket
|
||||||
# 10054 Foribly closed by remote
|
# 10054 Foribly closed by remote
|
||||||
# 107 Transport endpoint not connected
|
# 107 Transport endpoint not connected
|
||||||
# 57 Socket is not connected
|
# 57 Socket is not connected
|
||||||
|
# 49 Can't assign requested address (wifi down)
|
||||||
# 9 Bad file descriptor
|
# 9 Bad file descriptor
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
|
|
|
@ -1360,25 +1360,28 @@ function up2k_init(subtle) {
|
||||||
cdr = t.size;
|
cdr = t.size;
|
||||||
|
|
||||||
function orz(xhr) {
|
function orz(xhr) {
|
||||||
|
var txt = ((xhr.response && xhr.response.err) || xhr.responseText) + '';
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
pvis.prog(t, npart, cdr - car);
|
pvis.prog(t, npart, cdr - car);
|
||||||
st.bytes.uploaded += cdr - car;
|
st.bytes.uploaded += cdr - car;
|
||||||
t.bytes_uploaded += cdr - car;
|
t.bytes_uploaded += cdr - car;
|
||||||
st.busy.upload.splice(st.busy.upload.indexOf(upt), 1);
|
|
||||||
t.postlist.splice(t.postlist.indexOf(npart), 1);
|
|
||||||
if (t.postlist.length == 0) {
|
|
||||||
t.t4 = Date.now();
|
|
||||||
pvis.seth(t.n, 1, 'verifying');
|
|
||||||
st.todo.handshake.unshift(t);
|
|
||||||
}
|
|
||||||
tasker();
|
|
||||||
}
|
}
|
||||||
else
|
else if (txt.indexOf('already got that') !== -1) {
|
||||||
|
console.log("ignoring dupe-segment error");
|
||||||
|
}
|
||||||
|
else {
|
||||||
alert("server broke; cu-err {0} on file [{1}]:\n".format(
|
alert("server broke; cu-err {0} on file [{1}]:\n".format(
|
||||||
xhr.status, t.name) + (
|
xhr.status, t.name) + (txt || "no further information"));
|
||||||
(xhr.response && xhr.response.err) ||
|
return;
|
||||||
(xhr.responseText && xhr.responseText) ||
|
}
|
||||||
"no further information"));
|
st.busy.upload.splice(st.busy.upload.indexOf(upt), 1);
|
||||||
|
t.postlist.splice(t.postlist.indexOf(npart), 1);
|
||||||
|
if (t.postlist.length == 0) {
|
||||||
|
t.t4 = Date.now();
|
||||||
|
pvis.seth(t.n, 1, 'verifying');
|
||||||
|
st.todo.handshake.unshift(t);
|
||||||
|
}
|
||||||
|
tasker();
|
||||||
}
|
}
|
||||||
function do_send() {
|
function do_send() {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
Loading…
Reference in a new issue