From 5a477946065bcf05b335ededd6b794e82882ab73 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Sun, 11 Aug 2019 16:07:53 +0300 Subject: diskless replication rdb transfer uses pipe, and writes to sockets form the parent process. misc: - handle SSL_has_pending by iterating though these in beforeSleep, and setting timeout of 0 to aeProcessEvents - fix issue with epoll signaling EPOLLHUP and EPOLLERR only to the write handlers. (needed to detect the rdb pipe was closed) - add key-load-delay config for testing - trim connShutdown which is no longer needed - rioFdsetWrite -> rioFdWrite - simplified since there's no longer need to write to multiple FDs - don't detect rdb child exited (don't call wait3) until we detect the pipe is closed - Cleanup bad optimization from rio.c, add another one --- src/connection.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/connection.h') diff --git a/src/connection.h b/src/connection.h index e3e844f95..3fdcddebe 100644 --- a/src/connection.h +++ b/src/connection.h @@ -55,7 +55,6 @@ typedef struct ConnectionType { int (*connect)(struct connection *conn, const char *addr, int port, const char *source_addr, ConnectionCallbackFunc connect_handler); int (*write)(struct connection *conn, const void *data, size_t data_len); int (*read)(struct connection *conn, void *buf, size_t buf_len); - int (*shutdown)(struct connection *conn, int how); void (*close)(struct connection *conn); int (*accept)(struct connection *conn, ConnectionCallbackFunc accept_handler); int (*set_write_handler)(struct connection *conn, ConnectionCallbackFunc handler); @@ -159,10 +158,6 @@ static inline void connClose(connection *conn) { conn->type->close(conn); } -static inline int connShutdown(connection *conn, int how) { - return conn->type->shutdown(conn, how); -} - /* Returns the last error encountered by the connection, as a string. If no error, * a NULL is returned. */ @@ -208,4 +203,8 @@ int connFormatPeer(connection *conn, char *buf, size_t buf_len); int connSockName(connection *conn, char *ip, size_t ip_len, int *port); const char *connGetInfo(connection *conn, char *buf, size_t buf_len); +/* Helpers for tls special considerations */ +int tlsHasPendingData(); +void tlsProcessPendingData(); + #endif /* __REDIS_CONNECTION_H */ -- cgit v1.2.1