File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -746,7 +746,7 @@ received data, and close the connection::
746
746
loop = asyncio.get_running_loop()
747
747
748
748
server = await loop.create_server(
749
- lambda: EchoServerProtocol() ,
749
+ EchoServerProtocol,
750
750
'127.0.0.1', 8888)
751
751
752
752
async with server:
@@ -850,7 +850,7 @@ method, sends back received data::
850
850
# One protocol instance will be created to serve all
851
851
# client requests.
852
852
transport, protocol = await loop.create_datagram_endpoint(
853
- lambda: EchoServerProtocol() ,
853
+ EchoServerProtocol,
854
854
local_addr=('127.0.0.1', 9999))
855
855
856
856
try:
Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ def _start_handshake(self):
539
539
# start handshake timeout count down
540
540
self ._handshake_timeout_handle = \
541
541
self ._loop .call_later (self ._ssl_handshake_timeout ,
542
- lambda : self ._check_handshake_timeout () )
542
+ self ._check_handshake_timeout )
543
543
544
544
self ._do_handshake ()
545
545
@@ -619,7 +619,7 @@ def _start_shutdown(self):
619
619
self ._set_state (SSLProtocolState .FLUSHING )
620
620
self ._shutdown_timeout_handle = self ._loop .call_later (
621
621
self ._ssl_shutdown_timeout ,
622
- lambda : self ._check_shutdown_timeout ()
622
+ self ._check_shutdown_timeout
623
623
)
624
624
self ._do_flush ()
625
625
@@ -758,7 +758,7 @@ def _do_read__buffered(self):
758
758
else :
759
759
break
760
760
else :
761
- self ._loop .call_soon (lambda : self ._do_read () )
761
+ self ._loop .call_soon (self ._do_read )
762
762
except SSLAgainErrors :
763
763
pass
764
764
if offset > 0 :
You can’t perform that action at this time.
0 commit comments