Skip to content

Proxy.sslServers race condition #288

Open
@fopinappb

Description

@fopinappb

getHttpsServer(hostname, (err, port) => {

...
https server started for www.google.com on 54724
https server started for www.google.com on 54726
...

With concurrent requests to www.google.com this semaphore is but the asynchronous callback (that populates sslServers) is outside the lock/sem.

This results in 2+ sslServers created for the same hostname yet only the last is tracked in the dictionary. This also means only the last one is cleaned up upon Proxy.close() resulting in lingering handles...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions