Hi Minoru,
I saw your app curiously and I could reproduce your problem.
When I debugged your program, I could know that your problem was perhaps caused by duplicated socket binding.
I think that it is better that the client controller doesn't use a local address when it connects remote peer.
See the following:
In ConnectionManager.java
---
private ConnectorHandler createHandlerUDP(...) {
...
try {
//connectorHandler.connect(socketRemote, local, callbackHandler);
connectorHandler.connect(socketRemote, callbackHandler);
} ...
}
---
In my opinion, the server controller's socket which was already binded with a local address could have a problem if a client tried to bind own socket with the same address locally.
I could see that your program's server couldn't receive any packets though blocking DatagramSocket(UAC and UAS) sent a packet to the server controller successfully.
So I thought that maybe the server had a problem.
It is not certain. :-)
But, I hope that my proposed patch and my words help you.
Thanks!
--
Bongjae Chang
----- Original Message -----
From: "Minoru Nitta" <minoru.nitta_at_jp.fujitsu.com>
To: <dev_at_grizzly.dev.java.net>
Sent: Tuesday, June 02, 2009 5:28 PM
Subject: Strange behavior of Grizzly
> Salut,
>
>
>
> I have been encountering a strange behavior of grizzly, and I need help.
> I tested the enclosed program and it sometimes worked fine and it sometimes did
> not work well. When it works, it repeats sending requests and responses,
> but when it does not work well, it stops repeating.
>
> I have no idea where is the problem (my test program or grizzly).
> I tested it on grizzly version 1.9.12 to 1.9.16 and the result was same.
>
> Thanks.
>
> Minoru
>
>
--------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net