Fixes #13579.
I think one possible solution is to check for _transport.is_closing() in the lambda before sending a message (compatible with Python 3.4 too). Let me know if I missed any side effects this introduces.
tests: fixes mininode's P2PConnection sending messages on closing transport #13715
pull marcoagner wants to merge 1 commits into bitcoin:master from marcoagner:fix_mininode_p2pconnection_send_message changing 1 files +1 −1-
marcoagner commented at 12:16 PM on July 19, 2018: contributor
-
ea5340c9d2
tests: fixes mininode's P2PConnection sending messages on closing transport
- checks if _transport.is_closing() (added in python3.4.4/python3.5.1) before attempting to send messages on P2PConnection's send_message method.
-
MarcoFalke commented at 1:05 PM on July 19, 2018: member
utACK ea5340c9d24b5b59b178c06e7cb25495a282fdd0. Indeed, we shouldn't write to a transport that is closing. I don't see any side effects other than preventing the raised exceptions.
- MarcoFalke added the label Tests on Jul 19, 2018
- MarcoFalke merged this on Jul 19, 2018
- MarcoFalke closed this on Jul 19, 2018
- MarcoFalke referenced this in commit e1260a798d on Jul 19, 2018
- MarcoFalke added this to the milestone 0.17.0 on Jul 19, 2018
- marcoagner deleted the branch on Jul 19, 2018
-
domob1812 commented at 8:51 AM on July 23, 2018: contributor
Note that this seems to break with Debian Jessie (oldstable), which has only Python 3.4.2. I don't know if compatibility with Debian oldstable is a goal or not.
-
fanquake commented at 9:04 AM on July 23, 2018: member
@domob1812 If this has broken the tests on a system using Python 3.4+ then that's a problem, as 3.4 is our minimum supported version. Please open an issue/PR with any more details.
- domob1812 referenced this in commit b233b9c3d7 on Jul 23, 2018
- domob1812 referenced this in commit 4728553290 on Jul 23, 2018
- domob1812 referenced this in commit 64b9f27e0e on Jul 23, 2018
- MarcoFalke referenced this in commit ab28b5b527 on Jul 23, 2018
- Bushstar referenced this in commit 4cf7d34a20 on Jul 24, 2018
- HashUnlimited referenced this in commit abcd4e4bb1 on Sep 12, 2018
- joemphilips referenced this in commit 44001f95b7 on Nov 9, 2018
- jfhk referenced this in commit b8a0a20775 on Nov 14, 2018
- furszy referenced this in commit 4331a67772 on Jun 4, 2021
- furszy referenced this in commit 1460e5b812 on Jun 9, 2021
- furszy referenced this in commit c9f265c7aa on Jun 10, 2021
- furszy referenced this in commit 7038ae0bcc on Jun 12, 2021
- furszy referenced this in commit 649cc97ea5 on Jun 12, 2021
- furszy referenced this in commit 37aa223224 on Jun 14, 2021
- furszy referenced this in commit 6ca86b36b0 on Jun 22, 2021
- furszy referenced this in commit 77b9a4394b on Jun 22, 2021
- furszy referenced this in commit 0433f2380e on Jun 24, 2021
- furszy referenced this in commit db28a539ee on Jun 28, 2021
- furszy referenced this in commit 2f49b8e44c on Jun 28, 2021
- random-zebra referenced this in commit bffe509aed on Jun 28, 2021
- UdjinM6 referenced this in commit 62a51281a3 on Jun 29, 2021
- UdjinM6 referenced this in commit cf0d69952f on Jun 29, 2021
- UdjinM6 referenced this in commit 16fac5ab9a on Jun 29, 2021
- UdjinM6 referenced this in commit 010ff7d499 on Jun 29, 2021
- UdjinM6 referenced this in commit 6371bd96b3 on Jul 1, 2021
- UdjinM6 referenced this in commit 1395a6a01f on Jul 1, 2021
- UdjinM6 referenced this in commit fa3e3b4c07 on Jul 2, 2021
- UdjinM6 referenced this in commit 5f50a8c8ad on Jul 2, 2021
- UdjinM6 referenced this in commit 6f3d5a3e1b on Jul 2, 2021
- UdjinM6 referenced this in commit ea58f30a6f on Jul 2, 2021
- DrahtBot locked this on Sep 8, 2021
Contributors
Labels
Milestone
0.17.0