server socket does not get EOF when closing client socket without sending any data
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.
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.
I just tried it out and it didn't fix the issue I had.