Menu

#11 server response reader looses track

open
nobody
Network (5)
5
2013-02-19
2000-04-02
No

Please look at the following debug log snippet. It includes debug
messages I added in the ServerThread and NapsterReader.

NapsterReader: length=125
NapsterReader: command=212
NapsterReader: amountRead=125
Command: 212 Arg: Ghetteaux "C:\mp3s\Club Music\03. Atlantis - Voyager II.mp3" f3766cedd3ab4f5fcc57b5b79cbefec7-10555688 10555828 320 44100 263
NapsterReader: length=129
NapsterReader: command=212
NapsterReader: amountRead=129
Command: 212 Arg: Ghetteaux "C:\mp3s\Club Music\04. New World Project - Orion.mp3" 2a2200b0437b49bc2dea2af7709e3812-11671639 11671783 320 44100 290
NapsterReader: length=137
NapsterReader: command=212
ServerThread: java.io.InterruptedIOException: Read timed out
ServerThread: java.io.InterruptedIOException: Read timed out
NapsterReader: length=8237
NapsterReader: command=28755
NapsterReader: amountRead=8237
Command: 28755 Arg: ectrum (Original Mix).mp3" 24e34340615cd2601523148cdAa32b29d-11112618 11112770 320 44100 277.......

As you can see the reading of the data part of a response is
interrupted and the NapsterReader looses track of the protocol.

A possible workaround is to pass the socket to the NapterReader
instead of a input stream and disabling SO_TIMEOUT when a response
is accepted.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB