Changeset 481:dce8d3797246
- Timestamp:
- 09/02/08 21:28:56
(4 months ago)
- Author:
- Brian Warner <warner@allmydata.com>
- branch:
- default
- Message:
negotiate: add more information to the TubConnector? log message, to try to figure out #81
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r480 |
r481 |
|
| 1 | 1 | 2008-09-02 Brian Warner <warner@lothar.com> |
|---|
| | 2 | |
|---|
| | 3 | * foolscap/negotiate.py (TubConnector.__repr__): add more |
|---|
| | 4 | information to the repr, to help track down #81. Made TubConnector |
|---|
| | 5 | a new-style class in the process, to make upcalling easier. |
|---|
| | 6 | (TubConnector.checkForIdle): improve the log message |
|---|
| 2 | 7 | |
|---|
| 3 | 8 | * foolscap/pb.py (Tub._log_gatherer_connected): use callRemoteOnly |
|---|
| r469 |
r481 |
|
| 1254 | 1254 | |
|---|
| 1255 | 1255 | |
|---|
| 1256 | | class TubConnector: |
|---|
| | 1256 | class TubConnector(object): |
|---|
| 1257 | 1257 | """I am used to make an outbound connection. I am given a target TubID |
|---|
| 1258 | 1258 | and a list of locationHints, and I try all of them until I establish a |
|---|
| … | … | |
| 1304 | 1304 | self.pendingConnections = {} |
|---|
| 1305 | 1305 | |
|---|
| | 1306 | def __repr__(self): |
|---|
| | 1307 | s = object.__repr__(self) |
|---|
| | 1308 | s = s[:-1] |
|---|
| | 1309 | s += " from %s to %s>" % (self.tub.tubID, self.target.getTubID()) |
|---|
| | 1310 | return s |
|---|
| 1306 | 1311 | |
|---|
| 1307 | 1312 | def log(self, *args, **kwargs): |
|---|
| … | … | |
| 1455 | 1460 | # we have no more outstanding connections (either in progress or in |
|---|
| 1456 | 1461 | # negotiation), so this connector is finished. |
|---|
| 1457 | | self.log("connectorFinished") |
|---|
| | 1462 | self.log("connectorFinished (%s)" % self) |
|---|
| 1458 | 1463 | self.tub.connectorFinished(self) |
|---|