Skip to content

Commit da1712e

Browse files
committed
gearman_top: assume localhost if server is unset
1 parent 2264970 commit da1712e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/gearman_top.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ void print_stats(char * hostnam) {
215215
if(port_c != NULL)
216216
port = atoi(port_c);
217217

218+
if(strlen(server) == 0) {
219+
server = "localhost";
220+
}
221+
218222
/* get stats */
219223
stats = (mod_gm_server_status_t*)gm_malloc(sizeof(mod_gm_server_status_t));
220224
stats->function_num = 0;

0 commit comments

Comments
 (0)