Bug: batch set
- Dominant language
- JavaScript
- Stars
- 794
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
```ts
import hostile from 'hostile';
import { promisify } from 'util';
const hostileSet = promisify(hostile.set);
Promise.all([
hostileSet('1.2.3.4', 'test1'),
hostileSet('1.2.3.5', 'test2'),
hostileSet('1.2.3.4', 'test1'),
hostileSet('1.2.3.4', 'test3')
]).then(console.log);
// [ undefined, undefined, undefined, undefined ]
```
in host file:
```
1.2.3.4 test1
```
only add one line
------
```ts
import hostile from 'hostile';
import sleep from 'sleep-promise';
import { promisify } from 'util';
const hostileSet = promisify(hostile.set);
Promise.all([
(async () => {
await sleep(200);
await hostileSet('1.2.3.4', 'test1');
})(),
(async () => {
await sleep(200);
await hostileSet('1.2.3.5', 'test2');
})(),
(async () => {
await sleep(200);
await hostileSet('1.2.3.4', 'test1');
})(),
(async () => {
await sleep(200);
await hostileSet('1.2.3.4', 'test3');
})()
]).then(console.log);
// [ undefined, undefined, undefined, undefined ]
```
in host file:
```
1.2.3.4 test1
```
only add one line
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.