mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +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));
|
||||
|
||||
if (_read_buf_bytes_used == 0) {
|
||||
close(_sd);
|
||||
_sd = -1;
|
||||
return;
|
||||
}
|
||||
@ -406,7 +407,7 @@ Open_socket::Open_socket(int tcp_port)
|
||||
|
||||
Open_socket::~Open_socket()
|
||||
{
|
||||
close(_sd);
|
||||
if (_sd != -1) close(_sd);
|
||||
open_socket_pool()->remove(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user