Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection

Поиск
Список
Период
Сортировка
От Alan Cox
Тема Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection
Дата
Msg-id E139EuC-0005jk-00@the-village.bc.nu
обсуждение исходный текст
Ответ на Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>     3.  If the connection is in a synchronized state (ESTABLISHED,
>     FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT),
>     any unacceptable segment (out of window sequence number or
>     unacceptible acknowledgment number) must elicit only an empty
>     acknowledgment segment containing the current send-sequence number
>     and an acknowledgment indicating the next sequence number expected
>     to be received, and the connection remains in the same state.
> 
> Therefore, sending data to a no-longer-present receiver does not cause
> a connection reset (at least not in a spec-conforming TCP stack), and
> there is no justification for discarding data that is coming the other
> way.
> 
> The Linux kernel's present behavior is contrary to the standard, unable
> to support an essential user capability (ie, delivery of last-gasp error
> messages), and contrary to the behavior of all other TCP implementations
> that I have worked with.  There is a reason why you are in the minority
> here...

Reread the 3. above. What it actually requires if you think about it is that
the receive window is shrunk to zero and the connection hangs for all
eternity the way you are arguing it.

Alan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: [GENERAL] Revised Copyright: is this more palatable?
Следующее
От: Alan Cox
Дата:
Сообщение: Re: Fwd: Re: Fwd: Problem with recv syscall on socket when other side closed connection