mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
tcp_terminal: disconnect socket on empty read
The tcp_terminal kept the socket open even though the client disconnected. As a result, reconnecting to the tcp_terminal was not working. Fixes #1913
This commit is contained in:
parent
d32b5a54b6
commit
07e10a04f9
@ -191,6 +191,11 @@ class Open_socket : public Genode::List<Open_socket>::Element
|
|||||||
/* read from socket */
|
/* read from socket */
|
||||||
_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) {
|
||||||
|
_sd = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* notify client about bytes available for reading */
|
/* notify client about bytes available for reading */
|
||||||
if (_read_avail_sigh.valid())
|
if (_read_avail_sigh.valid())
|
||||||
Genode::Signal_transmitter(_read_avail_sigh).submit();
|
Genode::Signal_transmitter(_read_avail_sigh).submit();
|
||||||
|
Loading…
Reference in New Issue
Block a user