Skip to content

Commit

Permalink
Update user guide with note about socket re-use with bind_address (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion authored Dec 3, 2023
1 parent e568439 commit b338c9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/user/ae.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ requesting an association, which takes a 2-tuple of (:class:`str` *host*,
>>> ae.add_requested_context('1.2.840.10008.1.1')
>>> assoc = ae.associate("127.0.0.1", 11112, bind_address=("127.0.0.1", 11113)) # doctest: +SKIP

.. note::

When using *bind_address* you may sometimes be unable to immediately
reconnect with the same bound address and port due to an exception about
the socket or address already being in use. This occurs because
the `previous TCP connection using the bound socket
<https://hea-www.harvard.edu/~fine/Tech/addrinuse.html>`_ remains in a
``TIME_WAIT`` state which must expire before you are able to re-use the socket.

Association
...........
Expand Down

0 comments on commit b338c9d

Please sign in to comment.