AW: [Twisted-Python] udp exception if connection reset by other peer

p@ digi at
Wed May 14 18:19:38 EDT 2003

I think they are only raised if you connect to a localhost or local-lan
I think there is no need for an exception because you would need to
handle local and internet peers differently...

So I think swallow them silently is ok



-----Ursprüngliche Nachricht-----
Von: twisted-python-admin at
[mailto:twisted-python-admin at] Im Auftrag von Itamar
Gesendet: Mittwoch, 14. Mai 2003 23:45
An: twisted-python at
Betreff: Re: [Twisted-Python] udp exception if connection reset by other

On Wed, 14 May 2003 23:34:16 +0200
"p@" <digi at> wrote:

> If i send a udp packet with a connected udp-protocoll to an other peer
> where the port is closed or not reachable and the other peer resets
> the connection I get an exception...

Good point. UDP does occasionally give information about non-reachable
hosts, currently expressed in Twisted by an exception. Should I bother
raising these or just swallow them silently?

Meanwhile, you can just wrap the write() with a try/except: pass.

Itamar Shtull-Trauring -- Python & Twisted consulting

Twisted-Python mailing list
Twisted-Python at

More information about the Twisted-Python mailing list