mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 03:59:03 -04:00
Fixed a crash within the timeout for m_httpd sockets
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7740 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
9799eabcfd
commit
3eed8d8021
@ -68,7 +68,8 @@ class HttpServerSocket : public InspSocket
|
||||
std::string http_version;
|
||||
unsigned int postsize;
|
||||
HttpServerTimeout* Timeout;
|
||||
|
||||
friend class HttpServerTimeout;
|
||||
|
||||
public:
|
||||
|
||||
HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : InspSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0)
|
||||
@ -103,8 +104,7 @@ class HttpServerSocket : public InspSocket
|
||||
{
|
||||
if (InternalState == HTTP_LISTEN)
|
||||
{
|
||||
HttpServerSocket* s = new HttpServerSocket(this->Instance, newsock, ip, index);
|
||||
s = s; /* Stop GCC whining */
|
||||
new HttpServerSocket(this->Instance, newsock, ip, index);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -343,6 +343,7 @@ void HttpServerTimeout::Tick(time_t TIME)
|
||||
{
|
||||
SE->DelFd(s);
|
||||
s->Close();
|
||||
s->Timeout = NULL;
|
||||
}
|
||||
|
||||
class ModuleHttpServer : public Module
|
||||
|
Loading…
x
Reference in New Issue
Block a user