Added timeout around onopen ws call