version 1.78, 2004/10/05 00:11:53
|
version 1.82, 2004/12/15 14:12:42
|
|
|
//%2003//////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; | // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
// IBM Corp.; EMC Corporation, The Open Group. | // IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
| |
for( int indx = 0; indx < (int)_entries.size(); indx++) | for( int indx = 0; indx < (int)_entries.size(); indx++) |
{ | { |
if ((_entries[indx]._status.value() == _MonitorEntry::DYING) && |
const _MonitorEntry &entry = _entries[indx]; |
(_entries[indx]._type == Monitor::CONNECTION)) |
if ((entry._status.value() == _MonitorEntry::DYING) && |
|
(entry._type == Monitor::CONNECTION)) |
{ | { |
MessageQueue *q = MessageQueue::lookup(_entries[indx].queueId); |
MessageQueue *q = MessageQueue::lookup(entry.queueId); |
PEGASUS_ASSERT(q != 0); | PEGASUS_ASSERT(q != 0); |
MessageQueue & o = static_cast<HTTPConnection *>(q)->get_owner(); |
HTTPConnection &h = *static_cast<HTTPConnection *>(q); |
Message* message= new CloseConnectionMessage(_entries[indx].socket); |
|
|
if (h._connectionClosePending == false) |
|
continue; |
|
|
|
// NOTE: do not attempt to delete while there are pending responses |
|
// coming thru. The last response to come thru after a |
|
// _connectionClosePending will reset _responsePending to false |
|
// and then cause the monitor to rerun this code and clean up. |
|
// (see HTTPConnection.cpp) |
|
|
|
if (h._responsePending == true) |
|
{ |
|
Tracer::trace(TRC_HTTP, Tracer::LEVEL4, "Monitor::run - " |
|
"Ignoring connection delete request because " |
|
"responses are still pending. " |
|
"connection=0x%p, socket=%d\n", |
|
(void *)&h, h.getSocket()); |
|
continue; |
|
} |
|
h._connectionClosePending = false; |
|
MessageQueue &o = h.get_owner(); |
|
Message* message= new CloseConnectionMessage(entry.socket); |
message->dest = o.getQueueId(); | message->dest = o.getQueueId(); |
| |
// HTTPAcceptor is responsible for closing the connection. | // HTTPAcceptor is responsible for closing the connection. |