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

Itamar Shtull-Trauring itamar at itamarst.org
Wed May 14 17:45:25 EDT 2003

On Wed, 14 May 2003 23:34:16 +0200
"p@" <digi at treepy.com> 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    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting

More information about the Twisted-Python mailing list