retry if no key available
This commit is contained in:
parent
55e5599428
commit
c76064301f
@ -224,6 +224,11 @@ PeerServer.prototype._initializeHTTP = function() {
|
||||
var handle = function(req, res) {
|
||||
var key = req.params.key;
|
||||
var id = req.params.id;
|
||||
if (!self._clients[key]) {
|
||||
// Retry this request
|
||||
res.send(202);
|
||||
return;
|
||||
}
|
||||
var client = self._clients[key][id];
|
||||
// Auth the req
|
||||
if (!client || req.params.token !== client.token) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user