forked from github/abduco
commit-fix: RV_DETACH in client.c; if is now switch
This commit is contained in:
parent
6c6b505327
commit
64d897db14
15
client.c
15
client.c
|
|
@ -123,12 +123,13 @@ static int client_mainloop(void) {
|
|||
debug("client-stdin: %c\n", pkt.u.msg[0]);
|
||||
if (client.await_command) {
|
||||
client.await_command = false;
|
||||
if (pkt.u.msg[0]=='d') {
|
||||
pkt.type = MSG_DETACH;
|
||||
pkt.len = 0;
|
||||
client_send_packet(&pkt);
|
||||
close(server.socket);
|
||||
return -1;
|
||||
switch (pkt.u.msg[0]) {
|
||||
case 'd':
|
||||
pkt.type = MSG_DETACH;
|
||||
pkt.len = 0;
|
||||
client_send_packet(&pkt);
|
||||
close(server.socket);
|
||||
return RV_DETACH;
|
||||
}
|
||||
}
|
||||
pkt.len = len;
|
||||
|
|
@ -141,7 +142,7 @@ static int client_mainloop(void) {
|
|||
}
|
||||
} else if (len == 0) {
|
||||
debug("client-stdin: EOF\n");
|
||||
return -1;
|
||||
return RV_DETACH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue