Revision f6eb1be8
b/vncauthproxy/proxy.py | ||
---|---|---|
144 | 144 |
gevent.joinall(self.workers) |
145 | 145 |
del self.workers |
146 | 146 |
|
147 |
# Reintroduce the port number of the client socket in |
|
148 |
# the port pool, if applicable. |
|
149 |
if not self.pool is None: |
|
150 |
self.pool.append(self.sport) |
|
151 |
self.debug("Returned port %d to port pool, contains %d ports", |
|
152 |
self.sport, len(self.pool)) |
|
153 |
|
|
154 | 147 |
self.debug("Cleaning up sockets") |
155 | 148 |
while self.listeners: |
156 | 149 |
self.listeners.pop().close() |
... | ... | |
159 | 152 |
if self.client: |
160 | 153 |
self.client.close() |
161 | 154 |
|
155 |
# Reintroduce the port number of the client socket in |
|
156 |
# the port pool, if applicable. |
|
157 |
if not self.pool is None: |
|
158 |
self.pool.append(self.sport) |
|
159 |
self.debug("Returned port %d to port pool, contains %d ports", |
|
160 |
self.sport, len(self.pool)) |
|
161 |
|
|
162 | 162 |
self.info("Cleaned up connection, all done") |
163 | 163 |
raise gevent.GreenletExit |
164 | 164 |
|
Also available in: Unified diff