mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-06 01:11:46 +00:00
parent
0d488925ee
commit
f3c8233e7f
@ -194,6 +194,7 @@ class Open_socket : public Genode::List<Open_socket>::Element
|
|||||||
_read_buf_bytes_used = ::read(_sd, _read_buf, sizeof(_read_buf));
|
_read_buf_bytes_used = ::read(_sd, _read_buf, sizeof(_read_buf));
|
||||||
|
|
||||||
if (_read_buf_bytes_used == 0) {
|
if (_read_buf_bytes_used == 0) {
|
||||||
|
close(_sd);
|
||||||
_sd = -1;
|
_sd = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -406,7 +407,7 @@ Open_socket::Open_socket(int tcp_port)
|
|||||||
|
|
||||||
Open_socket::~Open_socket()
|
Open_socket::~Open_socket()
|
||||||
{
|
{
|
||||||
close(_sd);
|
if (_sd != -1) close(_sd);
|
||||||
open_socket_pool()->remove(this);
|
open_socket_pool()->remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user