]> prime8.dev >> repos - ttyd.git/commitdiff
protocol: exit thread as soon as the command terminate, fixes #112
authorSantosh Kumar Gupta <santosh0705@gmail.com>
Thu, 23 Aug 2018 20:49:12 +0000 (02:19 +0530)
committerShuanglei Tao <tsl0922@gmail.com>
Mon, 25 Mar 2019 03:46:38 +0000 (11:46 +0800)
src/protocol.c

index 07fe022be3f077e0e9579079139457c3c1cf2531..8e1e4b7c1998e0d997eacf29fb553d8d1923a102 100644 (file)
@@ -218,6 +218,8 @@ thread_run_command(void *args) {
                         break;
                     }
                 }
+
+                if (client->pty_len <= 0) break;
             }
             break;
     }