Behaviour on Stopping Reactor

ROHIT LADDHA <[email protected]> Sun, 24 Dec 2017 15:53:06 +0000
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAMyKuCOX-eJf7btpRaOebYM=bDD5KfTUZF+fBciVCPwJJg82PA@mail.gmail.com>
--===============4291446257600663827==
Content-Type: multipart/alternative; boundary="001a11428da44d68010561180c7d"

--001a11428da44d68010561180c7d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

I used following two libraries for udp listener

*from twisted.internet.protocol import DatagramProtocol*
*from twisted.internet import reactor*

When I do reactor.stop(), it processes all the buffered datagram packets.
That's fine but it should close the socket connection as well so that it
doesn't listen for any new packet. What's happening in my case is that
socket is getting a lot of packets continuously. If *reactor.stop()* is
called, the process doesn't exit because it's still getting packets from
the socket connection. Is this behaviour kept intentionally or we can
change it?

=E2=80=8CRegards
Rohit Laddha

--001a11428da44d68010561180c7d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><img width=3D"0" height=3D"0" class=3D"mailtrack-img" styl=
e=3D"display:flex" src=3D"https://mailtrack.io/trace/mail/f3eb244b1f3b9506b=
beac0700dcf2fa6061fc4ec.png?u=3D1235050#remove"><div>Hi,</div><div><br></di=
v><div>I used following two libraries for udp listener</div><div><i><br></i=
></div><div><i>from twisted.internet.protocol import DatagramProtocol</i></=
div><div><i>from twisted.internet import reactor</i></div><div><br></div>Wh=
en I do=C2=A0reactor.stop(), it processes all the buffered datagram packets=
. That&#39;s fine but it should close the socket connection as well so that=
 it doesn&#39;t listen for any new packet. What&#39;s happening in my case =
is that socket is getting a lot of packets continuously. If <i>reactor.stop=
()</i>=C2=A0is called, the process doesn&#39;t exit because it&#39;s still =
getting packets from the socket connection. Is this behaviour kept intentio=
nally or we can change it?<div><br>=E2=80=8CRegards</div><div>Rohit Laddha<=
/div></div>

--001a11428da44d68010561180c7d--

--===============4291446257600663827==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVHdpc3RlZC13
ZWIgbWFpbGluZyBsaXN0ClR3aXN0ZWQtd2ViQHR3aXN0ZWRtYXRyaXguY29tCmh0dHBzOi8vdHdp
c3RlZG1hdHJpeC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3R3aXN0ZWQtd2ViCg==

--===============4291446257600663827==--