Merge pull request #7992 from SeppoTakalo/fix-tcpsocket-accept

Fix TCPSocket::accept()
pull/8127/merge
Cruz Monrreal 2018-09-14 11:49:06 -05:00 committed by GitHub
commit 8475477ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ TCPSocket *TCPSocket::accept(nsapi_error_t *error)
ret = _stack->socket_accept(_socket, &socket, &address);
if (0 == ret) {
TCPSocket *connection = new TCPSocket();
connection = new TCPSocket();
connection->_lock.lock();
connection->_factory_allocated = true; // Destroy automatically on close()
connection->_remote_peer = address;