Replace some printf() in src/net with asserts

v0.7.4-release
Ryan 2009-07-13 16:35:48 +02:00
parent f99fbc61e1
commit 2819e3bcb8
2 changed files with 3 additions and 7 deletions

View File

@ -113,11 +113,7 @@ Connection::Init (void)
Connection::~Connection ()
{
static int i = 0;
if (socket_.fd > 0) {
printf("%d garbage collecting open Connection : %d\n", i++, socket_.fd);
printf(" socket->read_action: %p\n", socket_.read_action);
printf(" socket->write_action: %p\n", socket_.write_action);
}
assert(socket_.fd < 0 && "garbage collecting open Connection");
ForceClose();
}
@ -180,7 +176,6 @@ Connection::Connect (const Arguments& args)
return ThrowException(String::New("Must specify a port."));
String::AsciiValue port_sv(args[0]->ToString());
if (connection->port_) printf("connection->port_ = '%s'\n", connection->port_);
assert(connection->port_ == NULL);
connection->port_ = strdup(*port_sv);

View File

@ -90,8 +90,9 @@ private:
Connection *connection = static_cast<Connection*> (s->data);
connection->OnDisconnect();
if (s->errorno)
if (s->errorno) {
printf("socket died with error %d\n", s->errorno);
}
assert(connection->attached_);
connection->Detach();