Socket#getaddrinfo works in console but not in server

I am experiencing a strange problem with Socket#getaddrinfo. It correctly resolves IPs into hostnames while in console mode, but does not when run in server mode.

When in server mode, it simply returns the original IP unresolved.

Can anyone comment on this behaviour?

Much thanks Zac

Zac Zheng wrote:

I am experiencing a strange problem with Socket#getaddrinfo. It correctly resolves IPs into hostnames while in console mode, but does not when run in server mode.

When in server mode, it simply returns the original IP unresolved.

Can anyone comment on this behaviour?

Much thanks Zac

Since it's annoying reading a coding problem without code, I have made a pastie: http://pastie.org/419562

Any help will be gratefully received.

Zac