preventing server from dying of invalid chars
This commit is contained in:
parent
7317e1da82
commit
daf6258222
@ -84,7 +84,7 @@ char *read_socket(int socket)
|
|||||||
content_buffer = why2_calloc(content_size + 1, sizeof(char));
|
content_buffer = why2_calloc(content_size + 1, sizeof(char));
|
||||||
|
|
||||||
//READ FINAL MESSAGE
|
//READ FINAL MESSAGE
|
||||||
if (recv(socket, content_buffer, content_size, 0) != content_size) why2_die("Reading socket failed!");
|
if (recv(socket, content_buffer, content_size, 0) != content_size) fprintf(stderr, "Socket probably read wrongly!\n");
|
||||||
|
|
||||||
return content_buffer;
|
return content_buffer;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user