File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,16 @@ export class Nfsv4FsClient implements NfsFsClient {
9797 openOwner : structs . Nfsv4OpenOwner ,
9898 stateid : structs . Nfsv4Stateid ,
9999 ) : Promise < void > => {
100+ const key = this . makeOpenOwnerKey ( openOwner ) ;
101+ const previousSeqid = this . openOwnerSeqids . get ( key ) ;
100102 const seqid = this . nextOpenOwnerSeqid ( openOwner ) ;
101103 const response = await this . fs . compound ( [ nfs . CLOSE ( seqid , stateid ) ] ) ;
102104 if ( response . status !== Nfsv4Stat . NFS4_OK ) {
105+ if ( previousSeqid !== undefined ) {
106+ this . openOwnerSeqids . set ( key , previousSeqid ) ;
107+ } else {
108+ this . openOwnerSeqids . delete ( key ) ;
109+ }
103110 throw new Error ( `Failed to close file: ${ response . status } ` ) ;
104111 }
105112 } ;
Original file line number Diff line number Diff line change 1111 "no-unnecessary-initializer" : false ,
1212 "no-this-assignment" : false ,
1313 "no-duplicate-imports" : false ,
14+ "no-invalid-this" : false ,
1415 "no-angle-bracket-type-assertion" : false ,
1516 "ban-comma-operator" : false ,
1617 "no-unused-expression" : false ,
You can’t perform that action at this time.
0 commit comments