You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jakan2 says that the ecl socket server is getting killed when the client connection breaks. The relevant ecl code:
long SocketServer::write(const char *s, unsigned long n) ecl_debug_throw_decl(StandardException) {
int bytes_written = ::send(client_socket_fd,s,n,0);
if ( bytes_written < 0 ) {
switch(errno) {
case ( EPIPE ) : {
close();
return ConnectionHungUp;
}
default : {
ecl_debug_throw( devices::send_exception(LOC) );
error_handler = devices::send_error();
return ConnectionProblem;
}
}
}
}
So it seems we already had handling for exactly this in our old use cases, but this no longer works. Look up the man pages:
EPIPE The local end has been shut down on a connection oriented socket. In this case the process will also receive a SIGPIPE unless MSG_NOSIGNAL is set.
So SIGPIPE is getting sent which kills the server. The 'fix' would be to do this:
int bytes_written = ::send(client_socket_fd,s,n,0);
int bytes_written = ::send(client_socket_fd,s,n,MSG_NOSIGNAL);
The question is....why is this code falling over now and not before? If we know this, then we can know that we're not introducing another problem.
The text was updated successfully, but these errors were encountered:
@jakan2 says that the ecl socket server is getting killed when the client connection breaks. The relevant ecl code:
So it seems we already had handling for exactly this in our old use cases, but this no longer works. Look up the man pages:
So SIGPIPE is getting sent which kills the server. The 'fix' would be to do this:
The question is....why is this code falling over now and not before? If we know this, then we can know that we're not introducing another problem.
The text was updated successfully, but these errors were encountered: