diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/Termcast.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/App/Termcast.pm b/lib/App/Termcast.pm index 132a2b7..bf719e5 100644 --- a/lib/App/Termcast.pm +++ b/lib/App/Termcast.pm @@ -295,8 +295,13 @@ sub run { $self->_got_winch(0); redo; } - Carp::croak("Error reading from socket: $!") - unless defined $buf; + + if (defined $buf) { + $self->clear_socket; + } + else { + Carp::croak("Error reading from socket: $!"); + } } if ($self->bell_on_watcher) { |