Skip to content

Commit f014907

Browse files
committed
Close InputStream after creating the new session payload
1 parent 377b8bb commit f014907

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

java/client/src/org/openqa/selenium/remote/NewSessionPayload.java

+7
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ private NewSessionPayload(Reader source) {
107107
} catch (IOException e) {
108108
throw new UncheckedIOException(e);
109109
}
110+
111+
try {
112+
source.close();
113+
} catch (IOException e) {
114+
// Ignore
115+
}
116+
110117
}
111118

112119
private void validate() throws IOException {

0 commit comments

Comments
 (0)