do_connect(): set conn->err to an error if conn->pcb is NULL

This commit is contained in:
goldsimon 2010-01-14 19:49:27 +00:00
parent 9521f54741
commit 97f797e859

View File

@ -836,6 +836,8 @@ void
do_connect(struct api_msg_msg *msg)
{
if (msg->conn->pcb.tcp == NULL) {
/* This may happen when calling netconn_connect() a second time */
msg->conn->err = ERR_CLSD;
sys_sem_signal(msg->conn->op_completed);
return;
}