Opened 7 years ago

Last modified 6 years ago

#629 testing defect

Blocking close()

Reported by: zzz Owned by:
Priority: minor Milestone: 0.9.9
Component: streaming Version: 0.8.13
Keywords: Cc: zab@…
Parent Tickets: Sensitive: no

Description

MessageOutputStream?.close() and thus I2PSocketFull.close() is blocking. This is like SO_LINGER by default?

This is not standard socket behavior and isn't well-documented. Should it be changed and should we add setSoLinger() support? What would break if we changed it? Do we change flush() also? See comments in MessageOutputStream?.close(). If we don't change it, enhance the javadocs and website docs.

Subtickets

Change History (5)

comment:1 Changed 6 years ago by str4d

Milestone: 0.9.3

comment:7 Changed 6 years ago by zzz

Milestone: 0.9.9

Major changes propped as 0.9.8.1-2. I2PSocketFull.close() is now nonblocking. It cancels any pending user-side I/O. Writes already "accepted into the queue" will be flushed "in the background".

This brings it more in line with standard Java sockets default behaviour, which is like setSOLinger(true, 0).

MessageOutputStream?.close() of course is still blocking, although blocking until the ack is received is still there.

Leaving open for testing.

See also #1040 #1042

comment:8 Changed 6 years ago by str4d

Keywords: testing-needed added

comment:9 Changed 6 years ago by str4d

Keywords: testing-needed removed
Status: newtesting
Note: See TracTickets for help on using tickets.