From: Mikko Rasa Date: Sun, 25 Sep 2016 22:35:31 +0000 (+0300) Subject: Add error check to accept X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b069cfc670fb78b4b429d07d2aadb59628426a25;p=libs%2Fnet.git Add error check to accept --- diff --git a/source/net/streamserversocket.cpp b/source/net/streamserversocket.cpp index 9900e5d..1823dbd 100644 --- a/source/net/streamserversocket.cpp +++ b/source/net/streamserversocket.cpp @@ -38,7 +38,7 @@ StreamSocket *StreamServerSocket::accept() SockAddr::SysAddr sa; Private new_p; - new_p.handle = ::accept(priv->handle, reinterpret_cast(&sa.addr), &sa.size); + new_p.handle = check_sys_error(::accept(priv->handle, reinterpret_cast(&sa.addr), &sa.size)); RefPtr paddr = SockAddr::new_from_sys(sa); return new StreamSocket(new_p, *paddr);