Skip to content

Commit

Permalink
mosh-client: Return true for still_connecting if !network
Browse files Browse the repository at this point in the history
Fixes:

    $ MOSH_KEY=foo ./mosh-client 127.0.0.1 60010
    Crypto exception: Key must be 22 letters long.
    Segmentation fault

Closes mobile-shell#189.
  • Loading branch information
kmcallister authored and keithw committed Apr 16, 2012
1 parent c15d3d0 commit c8fe5a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frontend/stmclient.h
Expand Up @@ -53,7 +53,11 @@ class STMClient {

void output_new_frame( void );

bool still_connecting( void ) { return (network->get_remote_state_num() == 0); }
bool still_connecting( void )
{
/* Initially, network == NULL */
return ( !network ) || ( network->get_remote_state_num() == 0 );
}

public:
STMClient( const char *s_ip, int s_port, const char *s_key, const char *predict_mode )
Expand Down

0 comments on commit c8fe5a3

Please sign in to comment.