File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def __init__(self, lbind=None):
158158 self .udpmap = {}
159159 @property
160160 def direct (self ):
161- return isinstance (self , ProxyDirect )
161+ return type (self ) is ProxyDirect
162162 def logtext (self , host , port ):
163163 return '' if host == 'tunnel' else f' -> { host } :{ port } '
164164 def match_rule (self , host , port ):
@@ -315,7 +315,12 @@ async def drain():
315315 remote_addr = writer ._transport .protocol ._quic ._network_paths [0 ].addr
316316 writer .get_extra_info = dict (peername = remote_addr , sockname = remote_addr ).get
317317 writer .drain = drain
318- writer .close = writer .write_eof
318+ def close ():
319+ try :
320+ writer .write_eof ()
321+ except Exception :
322+ pass
323+ writer .close = close
319324 async def wait_open_connection (self , * args ):
320325 if self .handshake is not None :
321326 if not self .handshake .done ():
You can’t perform that action at this time.
0 commit comments