summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:31:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:31:48 +0000
commit7ae96519141a7aac4ef2597fb2eed75643f9c1bf (patch)
treec3287f0f6d698d2ba8f0f45a773ceb3cf5333ae0 /src/socket.cpp
parent949712aebaffd70e18bbaf45132bd73313becc6d (diff)
Checking that buffers are empty in destructor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3672 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index a1f322b50..4ae2f6768 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -278,7 +278,7 @@ bool InspSocket::FlushWriteBuffer()
}
else
{
- outbuffer[0] = outbuffer[0].substr(result + 1,outbuffer[0].length());
+ outbuffer[0] = outbuffer[0].substr(result + 1,outbuffer[0].length() - result);
}
}
else if ((result == -1) && (errno != EAGAIN))
@@ -398,5 +398,6 @@ void InspSocket::OnClose() { return; }
InspSocket::~InspSocket()
{
+ outbuffer.clear();
this->Close();
}