summaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
authorDaniel Dressler <danieru.dressler@gmail.com>2014-08-01 17:18:53 -0600
committerDaniel Dressler <danieru.dressler@gmail.com>2014-08-01 17:18:53 -0600
commit9aa9247718bf87a6f5e602b5126cc48c84d006b6 (patch)
tree848718024d784a845728433d023508f00a1853d7 /src/tcp.c
parent44f013b1bc7c9eaeffec87945641310698ef93da (diff)
Fix segfault upon alloc failure
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tcp.c b/src/tcp.c
index de79210..a51971b 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -106,6 +106,7 @@ struct http_packet_t *tcp_packet_get(struct tcp_conn_t *tcp,
ssize_t gotten_size = recv(tcp->sd, subbuffer, want_size, 0);
if (gotten_size < 0) {
int errno_saved = errno;
+ // TODO: checkfor timeout
ERR("recv failed with err %d:%s", errno_saved,
strerror(errno_saved));
goto error;