]> git.tdb.fi Git - libs/net.git/commitdiff
Add error check to accept
authorMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2016 22:35:31 +0000 (01:35 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 25 Sep 2016 22:35:31 +0000 (01:35 +0300)
source/net/streamserversocket.cpp

index 9900e5d93953576d0b6140bd0629222978adead7..1823dbd488ccf9585e020a11ef94d8bb2f092606 100644 (file)
@@ -38,7 +38,7 @@ StreamSocket *StreamServerSocket::accept()
 
        SockAddr::SysAddr sa;
        Private new_p;
-       new_p.handle = ::accept(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), &sa.size);
+       new_p.handle = check_sys_error(::accept(priv->handle, reinterpret_cast<sockaddr *>(&sa.addr), &sa.size));
 
        RefPtr<SockAddr> paddr = SockAddr::new_from_sys(sa);
        return new StreamSocket(new_p, *paddr);