-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
It would be better if the IP and UA could be passed directly to the parse() method rather than having to use set() before.
let ret = udgerParser.parse({
ua:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
ip:'2A02:598:7000:116:0:0:0:101'
});
The parser should be stateless to avoid problems in race conditions. For example it could happen that two requests to our service which accesses the global Udger instance from inside an async function happen at the same time, leading to a set() -> set() -> parse() -> parse() sequence where the second request overwrites the IP and UA of the first request before the first request gets to the parse() method call
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels