mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
mantis 8998: guard potencial null ref
This commit is contained in:
@@ -519,16 +519,23 @@ namespace OSHttpServer
|
||||
|
||||
public bool TrySendResponse(int bytesLimit)
|
||||
{
|
||||
if(m_currentResponse == null)
|
||||
return false;
|
||||
if (m_currentResponse.Sent)
|
||||
if (m_currentResponse == null)
|
||||
return false;
|
||||
try
|
||||
{
|
||||
if (m_currentResponse.Sent)
|
||||
return false;
|
||||
|
||||
if(!CanSend())
|
||||
return false;
|
||||
if(!CanSend())
|
||||
return false;
|
||||
|
||||
LastActivityTimeMS = ContextTimeoutManager.EnvironmentTickCount();
|
||||
return m_currentResponse.SendNextAsync(bytesLimit);
|
||||
LastActivityTimeMS = ContextTimeoutManager.EnvironmentTickCount();
|
||||
return m_currentResponse.SendNextAsync(bytesLimit);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void ContinueSendResponse()
|
||||
|
||||
Reference in New Issue
Block a user