Replace some printf() in src/net with asserts

This commit is contained in:
Ryan committed 2009-07-13 16:38:55 +02:00
1 parent f99fbc61e1
commit 2819e3bcb8
2 files changed
+3 -7

No files matched your search

+1 -6
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);
+2 -1
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();