This PR should fix the issue we are seeing with Firefox at the end of the upload test.
The issue was caused by the call to sock.close() which means waiting for the socket buffer to be completely sent to the ndt7 server. However, after 15 seconds the server abruptly closes the socket. I believe the same happens on other browsers such as Google Chrome but it isn't displayed in that case.
The changes in this PR make sure that the upload webworker is always terminated after 10 seconds, and that the complete callback gets called whether the webworker was terminated by a sock.close() or the 10-second timeout -- usually the latter.
This PR should fix the issue we are seeing with Firefox at the end of the upload test.
The issue was caused by the call to
sock.close()
which means waiting for the socket buffer to be completely sent to the ndt7 server. However, after 15 seconds the server abruptly closes the socket. I believe the same happens on other browsers such as Google Chrome but it isn't displayed in that case.The changes in this PR make sure that the upload webworker is always terminated after 10 seconds, and that the
complete
callback gets called whether the webworker was terminated by asock.close()
or the 10-second timeout -- usually the latter.This change is