Fix bug in NBAcceptResult

This commit is contained in:
Kirigaya Kazuto 2018-09-10 15:47:24 +08:00
parent 014e216301
commit 5071f615f2
2 changed files with 8 additions and 1 deletions

View File

@ -235,6 +235,11 @@ int vsock::setNonblocking()
}
}
bool vsock::isNonblocking()
{
return _vp->nonblocking;
}
vsock::~vsock()
{
if(_vp)
@ -1040,7 +1045,8 @@ void NBAcceptResult::_impl::update()
if (ret >= 0)
{
*out_binding_sfd = sfd;
// This is a BUG!! Fixed.
*out_binding_sfd = ret;
*out_binding_created = true;
status = 2;
}

View File

@ -49,6 +49,7 @@ class vsock
{
public:
int setNonblocking();
bool isNonblocking();
protected:
vsock();
vsock(const vsock&)=delete;