diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp index 9ea2fa0bf7..c0dd281024 100644 --- a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp @@ -1473,15 +1473,17 @@ TCPEndpoint::_Spawn(TCPEndpoint* parent, tcp_segment_header& segment, TRACE("Spawn()"); - // TODO error checking - ProtocolSocket::Open(); + // TODO: proper error handling! + if (ProtocolSocket::Open() != B_OK) { + T(Error(this, "opening failed", __LINE__)); + return DROP; + } fState = SYNCHRONIZE_RECEIVED; T(Spawn(parent, this)); fManager = parent->fManager; - // TODO: proper error handling! if (fManager->BindChild(this, buffer->destination) != B_OK) { T(Error(this, "binding failed", __LINE__)); return DROP;