handle play.rust-lang.org communication errors in playpens
also add 15s communication timeout
This commit is contained in:
parent
35a447d08a
commit
eed1a0a591
|
@ -329,8 +329,12 @@ function run_rust_code(code_block) {
|
|||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(params),
|
||||
timeout: 15000,
|
||||
success: function(response){
|
||||
result_block.text(response.result);
|
||||
}
|
||||
},
|
||||
error: function(qXHR, textStatus, errorThrown){
|
||||
result_block.text("Playpen communication " + textStatus);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue