Fix TCPSocket::accept()

This one was actually always return NULL, and unsted because we only
have tests with one device.

We will add the testcase for this soon
pull/7992/head
Seppo Takalo 2018-09-05 12:00:59 +03:00
parent 3057c6c722
commit 451852d19f
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;