mirror of
https://github.com/tlsnotary/PageSigner.git
synced 2026-01-10 07:07:57 -05:00
ditto for chrome + smaller gif spinner
This commit is contained in:
@@ -438,7 +438,8 @@ Socket.prototype.recv = function(){
|
||||
var uid = this.uid;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var startTime = new Date().getTime();
|
||||
var tmp_buf = [];
|
||||
var complete_records = [];
|
||||
var buf = [];
|
||||
var cancelled = false;
|
||||
var timer = setTimeout(function(){
|
||||
reject('recv: socket timed out');
|
||||
@@ -450,15 +451,18 @@ Socket.prototype.recv = function(){
|
||||
chrome.runtime.sendMessage(appId, {'command':'recv', 'uid':uid}, function(response){
|
||||
if (cancelled) return;
|
||||
if (response.data.length > 0){
|
||||
tmp_buf = [].concat(tmp_buf, response.data);
|
||||
if(! check_complete_records(tmp_buf)){
|
||||
buf = [].concat(buf, response.data);
|
||||
var rv = check_complete_records(buf);
|
||||
complete_records = [].concat(complete_records, rv.comprecs);
|
||||
if (! rv.is_complete){
|
||||
console.log("check_complete_records failed");
|
||||
buf = rv.incomprecs;
|
||||
setTimeout(check, 100);
|
||||
return;
|
||||
}
|
||||
clearTimeout(timer);
|
||||
console.log('recv promise resolved');
|
||||
resolve(tmp_buf);
|
||||
resolve(complete_records);
|
||||
return;
|
||||
}
|
||||
console.log('Another timeout in recv');
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -168,6 +168,8 @@ function checkDescribeVolumes(xmlDoc, instanceId, volumeId, volAttachTime, type)
|
||||
assert(attVolume.getElementsByTagName('status')[0].textContent === 'attached');
|
||||
var attTime = attVolume.getElementsByTagName('attachTime')[0].textContent;
|
||||
assert(volAttachTime === attTime);
|
||||
//Crucial: volume was created from snapshot and attached at the same instant
|
||||
//this guarantees that there was no time window to modify it
|
||||
assert(getSecondsDelta(attTime, volCreateTime) === 0);
|
||||
}catch(e){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user