diff options
Diffstat (limited to 'src/mmo')
-rw-r--r-- | src/mmo/socket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mmo/socket.cpp b/src/mmo/socket.cpp index ef70b67..1e294bd 100644 --- a/src/mmo/socket.cpp +++ b/src/mmo/socket.cpp @@ -362,6 +362,8 @@ void delete_session(Session *s) { if (!s) return; + // this needs to be before the fd_max-- + s->func_delete(s); io::FD fd = s->fd; // If this was the highest fd, decrease it @@ -371,8 +373,6 @@ void delete_session(Session *s) fd_max--; readfds.clr(fd); { - s->func_delete(s); - s->rdata.delete_(); s->wdata.delete_(); s->session_data.reset(); |