again trying to get host name

git-svn-id: svn://anubis/gvsu@154 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-09-18 01:19:37 +00:00
parent e517d04df1
commit aa97749483

View File

@ -98,16 +98,24 @@ public class ChatClient
public void run()
{
myListener = new ChatClientListener();
myRegistrationInfo =
new RegistrationInfo(myUserName,
InetAddress.getLocalHost().getHostName(),
myListener.getPort(),
true);
if (!register())
{
return;
}
try
{
myListener = new ChatClientListener();
myRegistrationInfo =
new RegistrationInfo(myUserName,
InetAddress.getLocalHost().getHostName(),
myListener.getPort(),
true);
if (!register())
{
return;
}
}
catch (Exception e)
{
e.printStackTrace();
return;
}
/* Start a thread to listen for connections in */
myListenThread = new Thread(myListener);