Commit 18d8a4a0 authored by Lakr Aream's avatar Lakr Aream 👼🏽

bug修复

parent 0250f492
......@@ -8,7 +8,7 @@ export class RequestManager {
public vaildateRequest(headers: object, params: object, from: string, callback: (isVaildated: boolean) => void) {
if (ConfigManager.shared.noSign) {
return true
callback(true)
}
const clientSignResult = headers["x-candiay-sign"]
......@@ -73,7 +73,7 @@ export class RequestManager {
const params: object = req.query
const from: string = req.host
const beginStamp = (new Date()).getTime() / 1000
const beginStamp = (new Date()).getTime()
let contextContaienr: { [key: string] : any } | undefined
this.vaildateRequest(headers, params, from, (vaildated) => {
......@@ -105,10 +105,10 @@ export class RequestManager {
})
let currentStamp = (new Date()).getTime() / 1000
let currentStamp = (new Date()).getTime()
while (contextContaienr === undefined && currentStamp - beginStamp < 10) {
require('deasync').runLoopOnce()
currentStamp = (new Date()).getTime() / 1000
currentStamp = (new Date()).getTime()
}
if (contextContaienr === undefined) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment