Avoid crashes when the ssh connction dies

We might want to deal with reconnections soon
This commit is contained in:
Nicolas Viennot 2016-01-23 00:52:35 -05:00
parent c1846177fc
commit 64e14eaff5

View File

@ -49,6 +49,9 @@ static void on_encoder_write(void *userdata, struct evbuffer *buffer)
ssize_t len, written;
unsigned char *buf;
if (!client->channel)
return;
for(;;) {
len = evbuffer_get_length(buffer);
if (!len)