Report error when binding to address fails

This fixes #21
pull/31/head
Andri Yngvason 2020-04-04 22:38:23 +00:00
parent 6e521a07a0
commit be401b5e4a
1 changed files with 3 additions and 1 deletions

View File

@ -454,8 +454,10 @@ static void on_fb_req(struct nvnc_client* client, bool is_incremental,
int init_nvnc(struct wayvnc* self, const char* addr, uint16_t port)
{
self->nvnc = nvnc_open(addr, port);
if (!self->nvnc)
if (!self->nvnc) {
log_error("Failed to bind to address\n");
return -1;
}
nvnc_set_userdata(self->nvnc, self);