StreamPipe's list of listeners (pipeListeners) is modified
by multiple threads, and also sometimes modified by the
listeners themselves. This change ensures that access to
pipeListeners is fully synchronized, and mutation by the
listeners cannot interfere with iteration.
StreamPipe's list of listeners (pipeListeners) is modified by multiple threads, and also sometimes modified by the listeners themselves. This change ensures that access to pipeListeners is fully synchronized, and mutation by the listeners cannot interfere with iteration.
Fixes https://github.com/fengyouchao/sockslib/issues/14