Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前端接收伺服器封包時間戳記不動 #50

Open
hms5232 opened this issue Feb 11, 2019 · 0 comments
Open

前端接收伺服器封包時間戳記不動 #50

hms5232 opened this issue Feb 11, 2019 · 0 comments

Comments

@hms5232
Copy link
Member

hms5232 commented Feb 11, 2019

分支clock上,採用每隔固定時間發送一次HttpRequest後,前端接收伺服器回傳的封包並讀取時間戳記來達成伺服器時間的效果。

可是發現有個問題:前端依然每隔固定時間發送和接收httprequest封包,但時間戳記不正確!在剛deploy(npm run build)時時間戳記都是正確的;但隨著距離deploy的時間拉長,時間戳記上時間更新的時間也會跟著拉長(而且間隔不一)。例如:deploy後兩個小時時間戳記改變頻率在3-9分鐘左右;一天左右後約在23-43分鐘;兩天之後間隔約2~6小時。雖然如此,但第一次接收的回應時間戳記是正確的,且同個頁面重新整理的話亦同,排除伺服器時間跑掉的可能性。

目前先寫出備案(分支clock-front-end):因為至少第一次接收的回應時間戳記是正確的,在接收第一次的回應後,更新時間和計時都改由前端javascript負責。

hms5232 referenced this issue Feb 22, 2019
因為之前提過的問題(https://github.com/0verseas/0verStudent/issues/50)導致登入頁面時時間是正確的
但登入後就通通GG

所以改採這種兼容並蓄的方式
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant