libutp icon indicating copy to clipboard operation
libutp copied to clipboard

server socket does not get EOF when closing client socket without sending any data

Open nojb opened this issue 9 years ago • 2 comments

Hello,

As in the subject, there seems to be a bug in libutp: if a connection is opened between a client and a server and the client closes the connection without sending any data, then the server does not get a STATE_EOF state change notification so the socket is kept around forever.

To reproduce, is enough to use ucat on the server as follows:

ucat -d -l -p 5678

and on the client as follows:

ucat -d 127.0.0.1 5678

and close (CTRL-D) the client connection without sending any data. The client will fail with ETIMEDOUT and the server will not get the STATE_EOF notification.

nojb avatar May 09 '16 15:05 nojb

I think I had to work around something like this, @nojb does it look related? https://github.com/anacrolix/go-libutp/blob/master/callbacks.go#L75. If so I can test the PR and see if it fixes this problem.

anacrolix avatar Feb 01 '18 08:02 anacrolix

I just tried it out and it didn't fix the issue I had.

anacrolix avatar Apr 14 '18 04:04 anacrolix