Changeset 706ee24 for apps/ministreaming


Ignore:
Timestamp:
Apr 4, 2015 5:00:57 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9d76790
Parents:
351a1a8
Message:

Streaming read timeout fixes:
i2ptunnel:

  • Better timeout handling when reading headers in HTTP server (improved fix for ticket #723) Enforce total header timeout with new readLine()
  • Prep for returning specific HTTP errors to client on request timeout and header errors, instead of just closing socket… further work to be in i2p.i2p.zzz.test2 branch

Streaming:

  • Fix read timeout on input stream - was waiting too long, often twice as long as timeout, or more Enforce total timeout even when notify()ed
  • Fix read() returning 0 on read timeout instead of -1 (possible fix for ticket #335) This prevents passing partial headers to server on timeout
  • Fix javadocs for read timeout to match current behavior
  • Fix StandardSocket? SoTimeout? to account for differences with I2PSocket readTimeout
  • log tweaks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java

    r351a1a8 r706ee24  
    3838     * What is the longest we'll block on the input stream while waiting
    3939     * for more data.  If this value is exceeded, the read() throws
    40      * InterruptedIOException
     40     * InterruptedIOException - FIXME doesn't really, returns -1 or 0 instead.
    4141     *
    4242     * WARNING: Default -1 (unlimited), which is probably not what you want.
    4343     *
    44      * @return timeout in ms
     44     * @return timeout in ms, 0 for nonblocking, -1 for forever
    4545     */
    4646    public long getReadTimeout();
     
    4949     * What is the longest we'll block on the input stream while waiting
    5050     * for more data.  If this value is exceeded, the read() throws
    51      * InterruptedIOException
     51     * InterruptedIOException - FIXME doesn't really, returns -1 or 0 instead.
    5252     *
    5353     * WARNING: Default -1 (unlimited), which is probably not what you want.
    5454     *
    55      * @param ms timeout in ms
     55     * @param ms timeout in ms, 0 for nonblocking, -1 for forever
    5656     */
    5757    public void setReadTimeout(long ms);
Note: See TracChangeset for help on using the changeset viewer.