Skip to content

Commit badeb54

Browse files
committed
Ensure object output streams get flushed. Fixes #54.
1 parent b7f645d commit badeb54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/orangefunction/tomcat/redissessions/JavaSerializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public byte[] attributesHashFrom(RedisSession session) throws IOException {
3737
ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(bos));
3838
) {
3939
oos.writeUnshared(attributes);
40-
40+
oos.flush();
4141
serialized = bos.toByteArray();
4242
}
4343

@@ -60,7 +60,7 @@ public byte[] serializeFrom(RedisSession session, SessionSerializationMetadata m
6060
) {
6161
oos.writeObject(metadata);
6262
session.writeObjectData(oos);
63-
63+
oos.flush();
6464
serialized = bos.toByteArray();
6565
}
6666

0 commit comments

Comments
 (0)