keep checking if server is still up (by polling its port) rather than sleeping for X number of seconds