File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1147,11 +1147,12 @@ def closed(self):
1147
1147
return self .state == CLOSED
1148
1148
1149
1149
def _reset (self , close ):
1150
+ old_state = self .state
1150
1151
with self .size_cond :
1151
1152
if self .closed :
1152
1153
return
1153
1154
if self .opts .pause_enabled :
1154
- self .state = PAUSED
1155
+ old_state , self .state = self . state , PAUSED
1155
1156
self .generation += 1
1156
1157
newpid = os .getpid ()
1157
1158
if self .pid != newpid :
@@ -1175,7 +1176,7 @@ def _reset(self, close):
1175
1176
if self .enabled_for_cmap :
1176
1177
listeners .publish_pool_closed (self .address )
1177
1178
else :
1178
- if self .enabled_for_cmap :
1179
+ if old_state != PAUSED and self .enabled_for_cmap :
1179
1180
listeners .publish_pool_cleared (self .address )
1180
1181
for sock_info in sockets :
1181
1182
sock_info .close_socket (ConnectionClosedReason .STALE )
You can’t perform that action at this time.
0 commit comments