File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,10 @@ def _remove(self, fileno: int) -> None:
174
174
"""Remove a connection by descriptor from the internal data structure."""
175
175
conn = self .connections [fileno ]
176
176
logger .debug ('Removing conn#{0} from pool' .format (id (conn )))
177
- conn .connection .shutdown (socket .SHUT_WR )
177
+ try :
178
+ conn .connection .shutdown (socket .SHUT_WR )
179
+ except OSError :
180
+ pass
178
181
conn .close ()
179
182
self .pools [conn .addr ].remove (conn )
180
183
del self .connections [fileno ]
Original file line number Diff line number Diff line change @@ -115,5 +115,8 @@ def run(self) -> None:
115
115
finally :
116
116
if not self .closed :
117
117
self .selector .unregister (self .sock )
118
- self .sock .shutdown (socket .SHUT_WR )
118
+ try :
119
+ self .sock .shutdown (socket .SHUT_WR )
120
+ except OSError :
121
+ pass
119
122
self .sock .close ()
You can’t perform that action at this time.
0 commit comments