Solved

GUSI: close(socket) hangs

Posted on 2000-03-07
2
192 Views
Last Modified: 2013-12-26
Hi there,

My system is: MacOS 9, CWP 5, GUSI 2 (config: OpenTransport, StreamSockets)
I have two apps, simple Client/Server using stream sockets. They can also talk fine together.

A strange thing:
- using "struct hostent* phe = gethostbyname()" doesn't return NULL if my host name is nonsens.
  I use instead "if( *(int*)phe->h_name == 0x7fffDEAD))". Sounds really silly but works. Ever heard about that?

My serious problem:
- "close()" never returns. It runs forever in an internal GUSI event loop (in GUSIIOTStreamSocket::close())
  It seems that OT is still waiting for some data from the server which has definitely nothing more to say. An dummy-recv is called, getting nothing,
  but this loop goes on and on. What's wrong? Are there still some nasty details to configure/set?

I'd really appreaciate if you'd have the time to answer.
Thanx and bye!
chris
0
Comment
Question by:charlass
2 Comments
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 50 total points
ID: 2638451
I haven't actually used GUSI so this answer may be way off the mark, but what it sounds like is that somehow the Open Transport request has been given an infinite timeout. There undoubtedly is some way to abort the call, but it's probably easier to fix the place it's initially being called. I'd go through looking for any receive data calls whose timeouts are infinite (or some incredibly huge number). Particularly watch in headers for default arguments that are set to infinity, etc.

That's about all the help 50 points is worth anyway ;)
0
 
LVL 1

Author Comment

by:charlass
ID: 2639088
Yep, your guess is right. OT insistet on having still data but a call of recv() didn't deliver any bytes. Queer.
But two days later vanished the problem (without any reasonable reason...).
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now