Close InputStream after creating the new session payload
@@ -107,6 +107,13 @@ private NewSessionPayload(Reader source) {
} catch (IOException e) {
throw new UncheckedIOException(e);
}
+
+ try {
+ source.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+
}
private void validate() throws IOException {
