Javability (Java, Zaurus, Linux, Live)
by Jean-Marc Autexier, Saarland/Germany
cat /dev/www | egrep 'Java|Linux|Zaurus|ITnews|Live' > blog
29.4.05
14:05 JCifs: soTimeout (
,
,
,
)
I had a problem today with jcifs soTimeout and writing a 'growing' file.
By default, socket timeout is set to 15sec. The following happens: start writing a file, wait 30 seconds, continue to write the file.
All data's before the timeout are corrupted (file size is correct, but 0x00 are written in the file instead of original data's). Seems that jcifs is not properly re-opening the connection after socket timeout.
Not sure what's happening exactly. I see that the file is correctly written at the beginning and also correct after socket timeout. But after writing again to the file, previous data's are replaced by 0x00.