diff options
-rw-r--r-- | tcpclient.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tcpclient.c b/tcpclient.c index 37434b7..7d2ec74 100644 --- a/tcpclient.c +++ b/tcpclient.c @@ -180,6 +180,9 @@ static void tcpclient_send(t_tcpclient *x, t_symbol *s, int argc, t_atom *argv) SETFLOAT(&output_atom, size); outlet_anything( x->x_statusout, gensym("sent"), 1, &output_atom); + if(size<0) { + tcpclient_disconnect(x); + } } static void tcpclient_receive_callback(void*y, t_iemnet_chunk*c, int argc, t_atom*argv) { |