Skip to content

Commit 6f8fa2a

Browse files
fix: remove session if chunked file transfer cannot be initiated (#1573)
### Motivation When a chunked file transfer is started a session is registered into the local session registry. However, if no data can be provided from the remote peer (e.g. if a template doesn't exist) the session is not unregistered from the local session registry. ### Modification Unregister a session from the local session registry if a chunked file transfer cannot be started. ### Result No dead chunked file transfer sessions in local session registry. --------- Co-authored-by: Pasqual Koschmieder <git@derklaro.dev>
1 parent 7fdc624 commit 6f8fa2a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

driver/impl/src/main/java/eu/cloudnetservice/driver/impl/network/chunk/builder/DefaultChunkedFileQueryBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public class DefaultChunkedFileQueryBuilder implements ChunkedFileQueryBuilder {
147147
return responseFuture;
148148
} else {
149149
// transfer couldn't be started for some reason
150+
sessionRegistry.completeSession(sessionId);
150151
throw new IllegalStateException("unable to start chunked data transfer");
151152
}
152153
});

0 commit comments

Comments
 (0)