]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Only output the 'AES on' message if the socket state isnt I_ERROR when its reached
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index 63bfee39e067b925220e13fd43bd6ffbebba430b..eb0ee86c82f524d8a5c48311f5847d055ed00ccf 100644 (file)
  * ---------------------------------------------------
  */
 
-#include <string>
-#include <sstream>
-#include <iostream>
-#include <fstream>
-#include <stdexcept>
-#include "inspircd_config.h"
 #include "socket.h"
 #include "configreader.h"
 #include "inspstring.h"
@@ -362,6 +356,8 @@ bool InspSocket::FlushWriteBuffer()
                                this->Instance->Log(DEBUG,"Write error on socket: %s",strerror(errno));
                                this->OnError(I_ERR_WRITE);
                                this->state = I_ERROR;
+                               this->Instance->SE->DelFd(this);
+                               this->Close();
                                return true;
                        }
                }