As the comment noted, the client is not sending a null value.

The isConnected() method does not do what you think it does, namely it does not tell you if the socket is currently "connected" to its peer, at least in the way you think it should. isConnected() becomes true as soon as the socket transitions into the connected state, and stays true thereafter, even after the socket is shutdown. See this discussion and others on stackoverflow.

The correct way to determine if the peer has shutdown the connection is to attempt to read from the socket and then examine the result for evidence of closure. Please read the Javadocs for the method you are using, they will tell you what the various return values mean. For the BufferedReader.readLine() method, it says:

Returns:
A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

Thus you need to check for a null return value to detect a normal socket closure, and if you receive an IOException that indicates some kind of network anomaly.

Answer from President James K. Polk on Stack Overflow
🌐
Google Support
support.google.com › messages › thread › 298479152 › null-problem
Null problem - Google Messages Community
RCS is now available for texting between Android and iPhones. Learn how to turn on RCS chats on your Android phone (link).
Top answer
1 of 3
3

As the comment noted, the client is not sending a null value.

The isConnected() method does not do what you think it does, namely it does not tell you if the socket is currently "connected" to its peer, at least in the way you think it should. isConnected() becomes true as soon as the socket transitions into the connected state, and stays true thereafter, even after the socket is shutdown. See this discussion and others on stackoverflow.

The correct way to determine if the peer has shutdown the connection is to attempt to read from the socket and then examine the result for evidence of closure. Please read the Javadocs for the method you are using, they will tell you what the various return values mean. For the BufferedReader.readLine() method, it says:

Returns:
A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs

Thus you need to check for a null return value to detect a normal socket closure, and if you receive an IOException that indicates some kind of network anomaly.

2 of 3
-1

Your MainClient() have no problem.

clientSocket.isConnected() function in MainServer() always check the status of the client and which results an infinite loop, so after the message 'client:4', clientInput.readLine() should return 'null'.

So instead of checking the client socket is connected or not you can check the client socket is closed or not using function 'clientSocket.isClosed()'.

replace the while loop in MainServer() with below code,

       while(!clientSocket.isClosed()) {

                clientMsg = clientInput.readLine();
                System.out.println("Client : " + clientMsg);

                if(clientMsg.equals("Closed")){
                     clientSocket.close();
                //  serverSocket.close();
                }
            }

this will help you to close the client socket at the time of receiving 'Closed' message from server and this avoid the infinite execution of while loop as well as null statement printing. The code "serverSocket.close()" help you to close the server socket and you can use this at 'MainServer()' if you need to stop the port listening.

Top answer
1 of 3
1
Thank you for posting to r/facebook . Please read the following (this does not mean your post has been removed): SCAM WARNING: If you are having a problem with your account, beware of scammers who may comment or DM you claiming they know someone who can fix your account, or asking you for money or your login information. If you receive a message like this, block and report them. Here is an example of me making a fake hack post and all the scammers who flocked it it, lol . THERE IS NO REASON FOR SOMEONE TO HAVE TO TELL YOU IN PRIVATE HOW TO GET YOUR ACCOUNT BACK. If you check the sub there are PLENTY of high karma posts that gives some tips should your account be hacked/locked. r/facebook is an unofficial community and the moderators are not associated with Facebook or Meta. DO NOT MESSAGE THE MODS ASKING FOR HELP WITH FACEBOOK. Please read the rules in the sidebar (or the 'about' tab if you're on mobile). If your post violates any of them, delete it. If you notice your post has multiple replies but you only see this post, the reason is due to bots and scammers already being removed trying to steal your info/money I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2 of 3
1
It’s a technical coding error. In the codebase “null” should actually be your actual first name. But there’s a bug in the codebase where your name, for whatever reason is not displaying. So the code will default to “null” or “undefined” depending on how the code is written. So the code could probably look something like this. const name = “John”; If (name) { return ‘${name} unsent a message’; } But if your name is missing, const could like like tbis: const name = null; null literally means nothing in the coding word. And it’s like an empty placeholder.
🌐
TikTok
tiktok.com › discover › null-sent-a-message-on-messenger-meaning
Null Sent A Message on Messenger Meaning | TikTok
December 15, 2025 - Discover the meaning behind a null message on Messenger and how it impacts your chats. Learn tips to read unsent messages easily!See more videos about Null Message Meaning, What Is Null Sent A Message on Messenger, Unable to Send Meaning on Messenger, Anong Meaning Ng Sent Sa Messenger, Messenger ...
🌐
TikTok
tiktok.com › discover › null-sent-a-message-on-messenger
Null Sent A Message on Messenger | TikTok
1 month ago - Discover how to send or read unsent messages on Messenger. Learn tips and tricks to navigate your chat effectively.See more videos about What Is Null Sent A Message on Messenger, Blank Message on Messenger, Messenger Sent You A Message, Message on Messenger Says Sent But Not Delivered, Messenger ...
🌐
Stack Exchange
android.stackexchange.com › questions › 11129 › sms-messages-just-have-null
SMS messages just have "null" - Android Enthusiasts Stack Exchange
July 3, 2011 - Possible Duplicate: SMS messages from one contact displayed as “null” I have a Samsung Galaxy 5. A coworker sent me a contact from his Nokia phone, which showed up as "null", and n...
Find elsewhere
🌐
Apple Community
discussions.apple.com › thread › 254324528
'Null' messages
October 30, 2022 - Your answers can help us make sure ... may seem like a simple step but it can sometimes help resolve unexpected issues: ... Press and hold the top button until the power off slider appears....
Top answer
1 of 3
3

The Sender[null] that you're seeing is normal behaviour. The ask method ? takes an implicit parameter sender with default value ActorRef.noSender. Normally, if you're inside an Actor you have an implicit ActorRef in scope called self, but since you're not in an Actor it's just taking the default.

It's likely that the cause of your error is that the Actor that receives your message just isn't responding in time.

2 of 3
0

I think you are not using routing over here that's why you are getting the timeout exception. for example, suppose your one request taking 1 second to get executed. and suppose you are getting 4 requests at a time and when the requests come to an actor it appends in a queue and for every request you are waiting for 8 seconds. so in the queue suppose 4th request will execute in 4 seconds so you will get the response within 8 seconds. But when 100 requests come at a time and your one actor will be available to process them and for the 100th request it will take 100 seconds to get executed but you are waiting only 8.second for the 100th request that's why you are getting the timeout exception.

so the solution is, you can use routing here for example -

system.actorOf(RoundRobinPool(concurrency).props(Props(new MyActor())))

and you can set concurrency on your system available process. suppose so set concurrency value 100 so now for the 100th request, it will take only 2 seconds to get executed. so I think routing can be a solution.

and if you don't know how many requests will be there it may be 1k or maybe more then it then you can go with dynamic creation of the actor where you can create the actor dynamically as per the request. so whenever a request will come, your one separate actor will be there to give the service for it.

🌐
Samsung Community
eu.community.samsung.com › one ui beta programme › one ui 3 › s20 | s20+ | s20 ultra › discussions
"null" message everywhere randomly - Samsung Community
February 4, 2021 - One is everytime I use back button to close an app, thus isse happens(see new screenshot) without any keyboard interaction. See screenshots attached. ... I'm not getting that, but I'm using Gboard. ... It is not just with keyboard. I have updated the post now ... Please report this issue via the Members application, so that it can be quickly resolved!
🌐
Apple Community
discussions.apple.com › thread › 7654895
Talk to text sent from "null" - Apple Community
September 8, 2016 - So presumably you are invoking Siri to send a message to your husband's iPhone, and are dictating the contents of the message to Siri. Assuming it actually was sent using iMessage (blue bubbles), check Settings > Messages > Send & Receive > Start New Conversations From and see it is set correctly.
🌐
Grafana
community.grafana.com › t › what-should-be-done-for-mail-notification-should-not-be-sent-when-no-data-or-null-values-are-there-it-should-send-only-when-it-satisfies-the-condition › 36006
What should be done for Mail notification should NOT be sent when No data or null values are there, It should send only when it satisfies the condition - Grafana Labs Community Forums
September 2, 2020 - what should be done for Mail notification should not be sent when No data or null values are there, It should send only when it satisfies the condition? The Mails are triggering when No data is there, I want only “Alerting” mails that to only when given condition is satisfied means when ...
🌐
Vocal Media
vocal.media › journal › what-does-posted-null-mean-on-instagram
What does posted null mean on Instagram - Vocal Media
Account Issues: Problems with your Instagram account, such as being logged out during the posting process or having your account flagged for suspicious activity, can also trigger this error. If you encounter the "Posted to Null" message on Instagram, here are some steps you can take to resolve it:
🌐
Apple Community
discussions.apple.com › thread › 251205749
Null messages - Apple Community
Null usually means "no signal" but don't know in your case as you do not say if you are only getting the notification...and still getting the message?...or not getting the message?...or if it is happening to just one contact?...happening all the time?...or just sometimes?...etc. If because of signal try a place where signal is better to see if they stop...or have the contact sending the message try another place.
🌐
Backendless
support.backendless.com › server code › codeless
How to stop sending a null value to an API post - Codeless - Backendless Support
February 16, 2021 - Application ID 4A47197B-AE30-FA84-FF56-0071F4010900 Expected Behavior Please describe the expected behavior of the issue, starting from the first action. I am creating a custom function to host a HTTP POST request. The POST request uses the Create Object block to update data at the destination.
🌐
Reddit
reddit.com › r/nostupidquestions › why do i keep getting "null sent a message" on facebook messenger every 20 minutes
r/NoStupidQuestions on Reddit: Why do I keep getting "null sent a message" on Facebook messenger every 20 minutes
December 3, 2022 -

I keep getting a Facebook Messenger notification on my phone every 20 minutes that says " null sent a message "

Google does not have any results. Even when I throw quotes around the search, Google still is not providing anything relevant. All Google shows when searching with quotes is YouTube to MP3 results and NONE actually include "null sent a message"

Checking my messages, there are no messages but I am getting this every 20 minutes

What does this mean?

🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › module › microsoft.powershell.core › out-null
Out-Null (Microsoft.PowerShell.Core) - PowerShell | Microsoft Learn
Access to this page requires authorization. You can try changing directories. ... Hides the output instead of sending it down the pipeline or displaying it. Out-Null [-InputObject <PSObject>] [<CommonParameters>]
Top answer
1 of 5
1

Hi Www_w_,

There are several causes why users receive NDR when sending emails. NDRs include a code that indicates why your email isn’t delivered, you can refer to the list in this article.

In your case, the emails you send have an invalid sender address (null sender), so it would be rejected by Office 365. Sometimes a rejected message will appear as “550 5.7.512 Access denied, message must be RFC 5322 section 3.6.2 compliant and include a valid From address”. This is an expected behavior, as the NDR cannot be sent back to the sender whose address is invalid. Therefore, NDR will not be sent and it will be “discarded”

We appreciate your understanding and patience. 

Best Regards,

Ruel

2 of 5
0

Thank you very much.

Please teach me.

>NDR will not be sent and it will be “discarded”

Exchange server have undeliverable queue and later, the NDR threw away?

Or when the message is null sender, Exchange server discard soon?

Well, and please teach me.

When my tenant's exchange server makes the NDR, exchange server send external smtp server the exchange online's NDR.

And exchange server discards the original message of external smtp server.

Is my understanding correct?

Please teach me.

The original message discard soon? Or is there the original message in exchange server's queue?

This URL is Exchange 2010.

https://technet.microsoft.com/en-US/library/bb232161%28v=exchg.141%29.aspx?f=255&MSPPError=-2147217396

This URL is Exchange 2013

https://technet.microsoft.com/en-US/library/bb125022(v=exchg.150).aspx

Well.....So, I think. Maybe, exchange online stores the discard message  in "Unreachable queue" too**.**

Undeliverable

🌐
Home Assistant
community.home-assistant.io › third party integrations › node-red
Node-red HA Call Service node - How to only send a message when it is passed a non null payload - Node-RED - Home Assistant Community
December 18, 2023 - Hi, I have a Node-Red flow with an exec node running a Python script that tests if my bins need to go out and if they do, it returns a string. I’m passing the exec stdout to a HA Call Service notify node and using this…