Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: premature deletion of socket causes hard-fault when opcua-cli…
…ent disconnects. When an incoming connection is accepted by TCPSocket::accept() a new TCPSocket is generated and allocated on the heap. At the same time a TCPSocket internal flag called "_factory_allocated" is set which causes the dynamically allocated memory to be deallocated when calling TCPSocket::close(). As a consequence there is no need to deallocate or close any TCPSocket object in "shutdown", as this is done when calling UA_close (= mbed_close). Calling TCPSocket::close already here would also cause a crash as the object would have been deallocated by the time the OPCUA stack would invoke UA_close.
- Loading branch information