Commit 9e32c2ef authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

dgram: fix double implicit bind error

Calling send() on an unbound socket forces an implicit bind to
a random port.

332fea5a made the 'listening' event asynchronous. Unfortunately,
it also introduced a bug where the implicit bind was tried more
than once if send() was called again before the first bind operation
completed.

Address that by keeping track of the bind status and making sure that
bind() is called only once.

Fixes #4499.
parent 30bd774f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment