add EWOULDBLOCK
fix uploading