fix possible crash on user deletion
[srvx.git] / src / ioset-impl.h
index d6b30455ff6dec381ce86a52d5be60501bc24437..a7bebeea52ed2071de0febc541377057330a4ff8 100644 (file)
 
 struct timeval;
 
-#define fd_wants_reads(FD) ((FD)->wants_reads || (FD)->state == IO_LISTENING)
 #define fd_wants_writes(FD) (((FD)->send.get != (FD)->send.put) || (FD)->state == IO_CONNECTING)
 
 struct io_engine {
     const char *name;
     int (*init)(void);
     void (*add)(struct io_fd *fd);
-    void (*remove)(struct io_fd *fd);
+    void (*remove)(struct io_fd *fd, int os_closed);
     void (*update)(struct io_fd *fd);
     int (*loop)(struct timeval *timeout);
     void (*cleanup)(void);