windows: Ensure pids are not reused if active

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2017-07-13 10:12:53 +02:00
parent 0b3e572b85
commit bff040d087
No known key found for this signature in database
GPG Key ID: 40CF16616B361216

View File

@ -31,6 +31,7 @@ func (p *Pool) Get() (uint32, error) {
}
if _, ok := p.pool[pid]; !ok {
p.cur = pid
p.pool[pid] = struct{}{}
return pid, nil
}
pid++