File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -155,19 +155,25 @@ function abortTransactionFragments(commandQueue: Deque<CommandItem>) {
155
155
156
156
export function closeHandler ( self ) {
157
157
return function ( ) {
158
+ const prevStatus = self . status ;
158
159
self . setStatus ( "close" ) ;
159
160
160
- if ( ! self . prevCondition ) {
161
- self . prevCondition = self . condition ;
162
- }
163
161
if ( self . commandQueue . length ) {
164
162
abortIncompletePipelines ( self . commandQueue ) ;
165
- self . prevCommandQueue = self . commandQueue ;
166
163
}
167
164
if ( self . offlineQueue . length ) {
168
165
abortTransactionFragments ( self . offlineQueue ) ;
169
166
}
170
167
168
+ if ( prevStatus === "ready" ) {
169
+ if ( ! self . prevCondition ) {
170
+ self . prevCondition = self . condition ;
171
+ }
172
+ if ( self . commandQueue . length ) {
173
+ self . prevCommandQueue = self . commandQueue ;
174
+ }
175
+ }
176
+
171
177
if ( self . manuallyClosing ) {
172
178
self . manuallyClosing = false ;
173
179
debug ( "skip reconnecting since the connection is manually closed." ) ;
You can’t perform that action at this time.
0 commit comments