Skip to content

Commit 47d757d

Browse files
committed
Unix: Don't print an error if bind fails
1 parent 06827c9 commit 47d757d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/unix/net_socket_unix.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,20 +429,16 @@ Error NetSocketUnix::bind(NetSocket::Address p_addr) {
429429
ERR_FAIL_COND_V(_family != p_addr.get_family(), ERR_INVALID_PARAMETER);
430430
switch (p_addr.get_family()) {
431431
case Family::INET: {
432-
Error res = _inet_bind(p_addr.ip(), p_addr.port());
433-
ERR_FAIL_COND_V(res != OK, res);
434-
} break;
432+
return _inet_bind(p_addr.ip(), p_addr.port());
433+
}
435434
case Family::UNIX: {
436435
_unix_path = p_addr.get_path();
437-
Error res = _unix_bind(_unix_path);
438-
ERR_FAIL_COND_V(res != OK, res);
439-
} break;
436+
return _unix_bind(_unix_path);
437+
}
440438
case Family::NONE:
441439
default:
442440
return ERR_INVALID_PARAMETER;
443441
}
444-
445-
return OK;
446442
}
447443

448444
Error NetSocketUnix::listen(int p_max_pending) {

0 commit comments

Comments
 (0)