Skip to content

Commit

Permalink
Merge pull request #22 from Lawlieta/master
Browse files Browse the repository at this point in the history
【修复】wiz_ping 错误地址时 shell 线程卡死问题(sendto timeout 处理问题)
  • Loading branch information
armink authored Jan 28, 2019
2 parents bdbb7be + f8432a7 commit ba458f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ioLibrary/Ethernet/wizchip_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ int8_t wizchip_disconnect(uint8_t sn)
{
if(getSn_IR(sn) & Sn_IR_TIMEOUT)
{
setSn_IR(sn, Sn_IR_TIMEOUT);
wizchip_close(sn);
return SOCKERR_TIMEOUT;
}
Expand Down Expand Up @@ -343,6 +344,7 @@ int32_t wizchip_send(uint8_t sn, uint8_t * buf, uint16_t len)
}
else if(tmp & Sn_IR_TIMEOUT)
{
setSn_IR(sn, Sn_IR_TIMEOUT);
wizchip_close(sn);
return SOCKERR_TIMEOUT;
}
Expand Down
3 changes: 2 additions & 1 deletion src/wiz_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ static void wiz_data_thread_entry(void *parameter)
}
if (sn_ir & Sn_IR_TIMEOUT)
{
setSn_IR(socket, Sn_IR_TIMEOUT);
/* deal with timeout event in the wiznet ioLibrary */
//setSn_IR(socket, Sn_IR_TIMEOUT);
}
}
}
Expand Down

0 comments on commit ba458f3

Please sign in to comment.