[wt4hq] Broken Pipe
Olivier F5MZN
olecam at f5mzn.org
Mon Jun 18 09:46:56 CEST 2007
Hi !
> Your client connection timed out (the client just vanished?).
>
> After cursory investigation, I believe that
>
> /* Try to send the bloc of data to the client */
> /* Note that one must not send the null-terminal character! */
> nBytesSent = _send(tun->sock, szBuffer, nBufferLen - 1, 0) + 1;
>
> if (nBufferLen == SOCKET_ERROR) {
>
> should read:
> if (nBytesSent == SOCKET_ERROR) {
>
> (buffer_read seems never to return -1 anyway...)
> And the following case statement should probably handle EINTR as well.
Thank you for pointing this out!
About EINTR signal: this should be handled by the "default" case
statement, which will issue in a disconnect. Do you suggest to handle it
differently?
> Also, I suggest commenting out the if (reason) _send ...
> in closeconn(), since closeconn is called (with a reason) if recv()
> fails. This could also cause send() into a connection that no longer
> exists, earning you a SIGPIPE...
This was the case in my last devel code but I'm afraid that the one
available on the web server was not that one! Sorry for that.
I have uploaded source code and binaries of wtTunnelSrv v2.2.
The HQ version of Win-Test will be available in the coming days.
73,
--
Olivier / f5mzn
More information about the Wt4hq
mailing list