Added 300 second timeout to kill socket for testing purposes.