Skip to content

Commit 451852d

Browse files
author
Seppo Takalo
committed
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
1 parent 3057c6c commit 451852d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/netsocket/TCPSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ TCPSocket *TCPSocket::accept(nsapi_error_t *error)
265265
ret = _stack->socket_accept(_socket, &socket, &address);
266266

267267
if (0 == ret) {
268-
TCPSocket *connection = new TCPSocket();
268+
connection = new TCPSocket();
269269
connection->_lock.lock();
270270
connection->_factory_allocated = true; // Destroy automatically on close()
271271
connection->_remote_peer = address;

0 commit comments

Comments
 (0)